- added role at registration with xootix
- cleaned folder
This commit is contained in:
15
plugins/fipfcard_plugin/php/register/partenaires.php
Normal file
15
plugins/fipfcard_plugin/php/register/partenaires.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
|
||||
function add_partenaires_PLGNTLS($customer_data){
|
||||
$current_url = $_SERVER['HTTP_REFERER'];
|
||||
$path_brut = parse_url($current_url, PHP_URL_PATH);
|
||||
$path = trim($path_brut, '/');
|
||||
if ($path === 'creation-du-compte-partenaire')
|
||||
$customer_data['role'] = 'partenaire';
|
||||
return $customer_data;
|
||||
}
|
||||
add_filter( 'xoo_el_register_new_customer_data', 'add_partenaires_PLGNTLS', 10, 1 );
|
||||
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user