aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions_user.inc.php
diff options
context:
space:
mode:
authormistic100 <mistic@piwigo.org>2014-06-02 07:55:46 +0000
committermistic100 <mistic@piwigo.org>2014-06-02 07:55:46 +0000
commit4bd32005b56f6ec741ceeed0a1745fe89f291085 (patch)
treee2ee9bb68d07822bb7c0122831a0ce313a5af2d2 /include/functions_user.inc.php
parentf98edc7a2e423bed534977107e4cb892180cb946 (diff)
feature 3010 : replace trigger_action/event by trigger_notify/change
git-svn-id: http://piwigo.org/svn/trunk@28587 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/functions_user.inc.php')
-rw-r--r--include/functions_user.inc.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/include/functions_user.inc.php b/include/functions_user.inc.php
index e364b8214..5ee56f0f2 100644
--- a/include/functions_user.inc.php
+++ b/include/functions_user.inc.php
@@ -174,7 +174,7 @@ function register_user($login, $password, $mail_address, $notify_admin=true, &$e
}
}
- $errors = trigger_event(
+ $errors = trigger_change(
'register_user_check',
$errors,
array(
@@ -273,7 +273,7 @@ SELECT id
);
}
- trigger_action(
+ trigger_notify(
'register_user',
array(
'id'=>$user_id,
@@ -959,7 +959,7 @@ function log_user($user_id, $remember_me)
$_SESSION['pwg_uid'] = (int)$user_id;
$user['id'] = $_SESSION['pwg_uid'];
- trigger_action('user_login', $user['id']);
+ trigger_notify('user_login', $user['id']);
}
/**
@@ -984,7 +984,7 @@ function auto_login()
if ($key!==false and $key===$cookie[2])
{
log_user($cookie[0], true);
- trigger_action('login_success', stripslashes($username));
+ trigger_notify('login_success', stripslashes($username));
return true;
}
}
@@ -1085,7 +1085,7 @@ function pwg_password_verify($password, $hash, $user_id=null)
*/
function try_log_user($username, $password, $remember_me)
{
- return trigger_event('try_log_user', false, $username, $password, $remember_me);
+ return trigger_change('try_log_user', false, $username, $password, $remember_me);
}
add_event_handler('try_log_user', 'pwg_login', EVENT_HANDLER_PRIORITY_NEUTRAL, 4);
@@ -1121,10 +1121,10 @@ SELECT '.$conf['user_fields']['id'].' AS id,
if ($conf['password_verify']($password, $row['password'], $row['id']))
{
log_user($row['id'], $remember_me);
- trigger_action('login_success', stripslashes($username));
+ trigger_notify('login_success', stripslashes($username));
return true;
}
- trigger_action('login_failure', stripslashes($username));
+ trigger_notify('login_failure', stripslashes($username));
return false;
}
@@ -1135,7 +1135,7 @@ function logout_user()
{
global $conf;
- trigger_action('user_logout', @$_SESSION['pwg_uid']);
+ trigger_notify('user_logout', @$_SESSION['pwg_uid']);
$_SESSION = array();
session_unset();