diff options
author | Gabriel Birke <Gabriel.Birke@delti.com> | 2008-08-17 16:11:21 +0200 |
---|---|---|
committer | Gabriel Birke <Gabriel.Birke@delti.com> | 2008-08-17 16:11:21 +0200 |
commit | 7d3c8d4263d48bd16be068d3b134f70451afac94 (patch) | |
tree | bfed95742d29aca438887ddaa84869ed0adda5f7 /inc/auth.php | |
parent | e7835c601a9d31a48299c5cf122de0df6f61a08a (diff) | |
download | rpg-7d3c8d4263d48bd16be068d3b134f70451afac94.tar.gz rpg-7d3c8d4263d48bd16be068d3b134f70451afac94.tar.bz2 |
Wrap user modifications in events
Adds a wrapper function in the basic auth class which is used by the core code
to modify the user database. The wrapper function signals events and delegates
the action to the auth backend.
darcs-hash:20080817141121-79ce3-3300a4342b62a7a18ebcc9a765d87b30a0264621.gz
Diffstat (limited to 'inc/auth.php')
-rw-r--r-- | inc/auth.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/inc/auth.php b/inc/auth.php index 6e3b543de..8d6f48738 100644 --- a/inc/auth.php +++ b/inc/auth.php @@ -630,7 +630,7 @@ function register(){ } //okay try to create the user - if(!$auth->createUser($_POST['login'],$pass,$_POST['fullname'],$_POST['email'])){ + if(!$auth->triggerUserMod('create', array($_POST['login'],$pass,$_POST['fullname'],$_POST['email']))){ msg($lang['reguexists'],-1); return false; } @@ -715,7 +715,7 @@ function updateprofile() { } } - return $auth->modifyUser($_SERVER['REMOTE_USER'], $changes); + return $auth->triggerUserMod('modify', array($_SERVER['REMOTE_USER'], $changes)); } /** @@ -764,7 +764,7 @@ function act_resendpwd(){ } $pass = auth_pwgen(); - if (!$auth->modifyUser($user,array('pass' => $pass))) { + if (!$auth->triggerUserMod('modify', array($user,array('pass' => $pass)))) { msg('error modifying user data',-1); return false; } |