wip filter email registration
This commit is contained in:
@@ -12,19 +12,19 @@ if (!defined('ABSPATH')) {
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* early checks on payment page
|
||||
*
|
||||
*/
|
||||
function payment_page_checks_CIPF() {
|
||||
PLGNTLS_class::debug_infos();
|
||||
PLGNTLS_class::debug_infos(2);
|
||||
$slug_paypal_page = PLGNTLS_class::SLUG_PAYPAL_PAGE;
|
||||
|
||||
// check the slug
|
||||
if (!is_page($slug_paypal_page)) {
|
||||
return;
|
||||
}
|
||||
PLGNTLS_class::debug_infos();
|
||||
|
||||
// get the user id
|
||||
$user_id = get_current_user_id();
|
||||
@@ -36,12 +36,13 @@ add_action('wp', 'payment_page_checks_CIPF');
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* only profs can access this page
|
||||
*
|
||||
*/
|
||||
function payment_page_redirects_CIPF() {
|
||||
PLGNTLS_class::debug_infos();
|
||||
PLGNTLS_class::debug_infos(2);
|
||||
$slug_paypal_page = PLGNTLS_class::SLUG_PAYPAL_PAGE;
|
||||
$role_prof = PLGNTLS_class::ROLE_PROF;
|
||||
|
||||
@@ -53,6 +54,7 @@ function payment_page_redirects_CIPF() {
|
||||
if (!is_page($slug_paypal_page)) {
|
||||
return;
|
||||
}
|
||||
PLGNTLS_class::debug_infos();
|
||||
|
||||
/*
|
||||
* if prof, don't redirect
|
||||
@@ -75,13 +77,14 @@ add_action('template_redirect', 'payment_page_redirects_CIPF');
|
||||
*
|
||||
*/
|
||||
function payment_page_scripts_CIPF() {
|
||||
PLGNTLS_class::debug_infos();
|
||||
PLGNTLS_class::debug_infos(2);
|
||||
$slug_paypal_page = PLGNTLS_class::SLUG_PAYPAL_PAGE;
|
||||
|
||||
// check the slug
|
||||
if (!is_page($slug_paypal_page)) {
|
||||
return;
|
||||
}
|
||||
PLGNTLS_class::debug_infos();
|
||||
|
||||
// get the user id
|
||||
$user_id = get_current_user_id();
|
||||
|
||||
Reference in New Issue
Block a user