From 7d3c8d4263d48bd16be068d3b134f70451afac94 Mon Sep 17 00:00:00 2001 From: Gabriel Birke Date: Sun, 17 Aug 2008 16:11:21 +0200 Subject: 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 --- inc/auth.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'inc/auth.php') 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; } -- cgit v1.2.3