Skip to content

Commit

Permalink
Merge from revision 2236.
Browse files Browse the repository at this point in the history
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/trunk@2237 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
patdenice committed Mar 1, 2008
1 parent 2ef8c58 commit 7bff258
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
11 changes: 10 additions & 1 deletion include/functions_user.inc.php
Expand Up @@ -93,6 +93,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)
{
Expand Down Expand Up @@ -1227,7 +1236,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'];
}
Expand Down
3 changes: 3 additions & 0 deletions profile.php
Expand Up @@ -41,6 +41,8 @@

$userdata = $user;

trigger_action('loc_begin_profile');

save_profile_from_post($userdata, $errors);

$title= l10n('customize_page_title');
Expand All @@ -66,6 +68,7 @@
}
}
$template->set_filename('profile', 'profile.tpl');
trigger_action('loc_end_profile');
$template->parse('profile');
include(PHPWG_ROOT_PATH.'include/page_tail.php');
}
Expand Down

0 comments on commit 7bff258

Please sign in to comment.