diff options
author | Gerry Weißbach <gerry.w@gammaproduction.de> | 2014-12-22 10:40:15 +0100 |
---|---|---|
committer | Gerry Weißbach <gerry.w@gammaproduction.de> | 2014-12-22 10:40:15 +0100 |
commit | fc30ac3acbd4e17e25955ccdd0c5539ee2c9beca (patch) | |
tree | 3d287ae466500a6072b84d14ff4911fa936d1479 /lib/plugins/auth.php | |
parent | de4634ec87b1a277c1686990d993dafc43db05ed (diff) | |
parent | 8da2ebf4f4261eb8f54df5704b5d9af283b5402d (diff) | |
download | rpg-fc30ac3acbd4e17e25955ccdd0c5539ee2c9beca.tar.gz rpg-fc30ac3acbd4e17e25955ccdd0c5539ee2c9beca.tar.bz2 |
Merge branch 'master' into new_css.php
Diffstat (limited to 'lib/plugins/auth.php')
-rw-r--r-- | lib/plugins/auth.php | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/lib/plugins/auth.php b/lib/plugins/auth.php index b04735639..4799b3a38 100644 --- a/lib/plugins/auth.php +++ b/lib/plugins/auth.php @@ -116,7 +116,7 @@ class DokuWiki_Auth_Plugin extends DokuWiki_Plugin { * @author Gabriel Birke <birke@d-scribe.de> * @param string $type Modification type ('create', 'modify', 'delete') * @param array $params Parameters for the createUser, modifyUser or deleteUsers method. The content of this array depends on the modification type - * @return mixed Result from the modification function or false if an event handler has canceled the action + * @return bool|null|int Result from the modification function or false if an event handler has canceled the action */ public function triggerUserMod($type, $params) { $validTypes = array( @@ -124,12 +124,15 @@ class DokuWiki_Auth_Plugin extends DokuWiki_Plugin { 'modify' => 'modifyUser', 'delete' => 'deleteUsers' ); - if(empty($validTypes[$type])) + if(empty($validTypes[$type])) { return false; + } + + $result = false; $eventdata = array('type' => $type, 'params' => $params, 'modification_result' => null); $evt = new Doku_Event('AUTH_USER_CHANGE', $eventdata); if($evt->advise_before(true)) { - $result = call_user_func_array(array($this, $validTypes[$type]), $params); + $result = call_user_func_array(array($this, $validTypes[$type]), $evt->data['params']); $evt->data['modification_result'] = $result; } $evt->advise_after(); @@ -229,14 +232,15 @@ class DokuWiki_Auth_Plugin extends DokuWiki_Plugin { * at least these fields: * * name string full name of the user - * mail string email addres of the user + * mail string email address of the user * grps array list of groups the user is in * * @author Andreas Gohr <andi@splitbrain.org> * @param string $user the user name - * @return array containing user data or false + * @param bool $requireGroups whether or not the returned data must include groups + * @return false|array containing user data or false */ - public function getUserData($user) { + public function getUserData($user, $requireGroups=true) { if(!$this->cando['external']) msg("no valid authorisation system in use", -1); return false; } |