From 238b1e4412067dda6e8135ce7e18f6d3ac2681f3 Mon Sep 17 00:00:00 2001 From: patdenice Date: Sat, 1 Mar 2008 15:25:37 +0000 Subject: 801: add trigger in register_user function. 805: add 2 triggers in profile.php. 769: correct get_email_address_as_display_text function. git-svn-id: http://piwigo.org/svn/branches/branch-1_7@2236 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/functions_user.inc.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'include') 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']; } -- cgit v1.2.3