diff options
Diffstat (limited to '')
-rw-r--r-- | include/functions_user.inc.php | 11 | ||||
-rw-r--r-- | profile.php | 3 |
2 files changed, 13 insertions, 1 deletions
diff --git a/include/functions_user.inc.php b/include/functions_user.inc.php index 6817ec263..1d4df9536 100644 --- a/include/functions_user.inc.php +++ b/include/functions_user.inc.php @@ -71,6 +71,15 @@ function register_user($login, $password, $mail_address, array_push($errors, $mail_error); } + $errors = trigger_event('register_user_check', + $errors, + array( + 'login'=>$login, + 'password'=>$password, + 'email'=>$mail_address, + ) + ); + // if no error until here, registration of the user if (count($errors) == 0) { @@ -1233,7 +1242,7 @@ function get_email_address_as_display_text($email_address) } else { - if (script_basename() == 'admin' and is_adviser()) + if (defined('IN_ADMIN') and is_adviser()) { return 'adviser.mode@'.$_SERVER['SERVER_NAME']; } diff --git a/profile.php b/profile.php index 26d73b5a9..d391d61f5 100644 --- a/profile.php +++ b/profile.php @@ -41,6 +41,8 @@ if (!defined('PHPWG_ROOT_PATH')) $userdata = $user; + trigger_action('loc_begin_profile'); + save_profile_from_post($userdata, $errors); $title= l10n('customize_page_title'); @@ -66,6 +68,7 @@ if (!defined('PHPWG_ROOT_PATH')) } } $template->set_filename('profile', 'profile.tpl'); + trigger_action('loc_end_profile'); $template->parse('profile'); include(PHPWG_ROOT_PATH.'include/page_tail.php'); } |