summaryrefslogtreecommitdiff
path: root/lib/plugins
diff options
context:
space:
mode:
authorGabriel Birke <Gabriel.Birke@delti.com>2008-08-17 16:11:21 +0200
committerGabriel Birke <Gabriel.Birke@delti.com>2008-08-17 16:11:21 +0200
commit7d3c8d4263d48bd16be068d3b134f70451afac94 (patch)
treebfed95742d29aca438887ddaa84869ed0adda5f7 /lib/plugins
parente7835c601a9d31a48299c5cf122de0df6f61a08a (diff)
downloadrpg-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 'lib/plugins')
-rw-r--r--lib/plugins/usermanager/admin.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/plugins/usermanager/admin.php b/lib/plugins/usermanager/admin.php
index 0a3de919f..1d35c7abe 100644
--- a/lib/plugins/usermanager/admin.php
+++ b/lib/plugins/usermanager/admin.php
@@ -346,7 +346,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
return false;
}
- if ($ok = $this->_auth->createUser($user,$pass,$name,$mail,$grps)) {
+ if ($ok = $this->_auth->triggerUserMod('create', array($user,$pass,$name,$mail,$grps))) {
msg($this->lang['add_ok'], 1);
@@ -373,7 +373,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
if (!is_array($selected) || empty($selected)) return false;
$selected = array_keys($selected);
- $count = $this->_auth->deleteUsers($selected);
+ $count = $this->_auth->triggerUserMod('delete', array($selected));
if ($count == count($selected)) {
$text = str_replace('%d', $count, $this->lang['delete_ok']);
msg("$text.", 1);
@@ -454,7 +454,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
if (!empty($newgrps) && $this->_auth->canDo('modGroups') && $newgrps != $oldinfo['grps'])
$changes['grps'] = $newgrps;
- if ($ok = $this->_auth->modifyUser($olduser, $changes)) {
+ if ($ok = $this->_auth->triggerUserMod('modify', array($olduser, $changes))) {
msg($this->lang['update_ok'],1);
if (!empty($_REQUEST['usernotify']) && $newpass) {