diff options
author | Andreas Gohr <andi@splitbrain.org> | 2010-06-26 18:59:23 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2010-06-26 18:59:23 +0200 |
commit | 93eefc2f33c3ee04c61c03932b74586fa412463c (patch) | |
tree | 87670b8746f8e669bc90b2cd10f498cf1a962d26 /lib/plugins | |
parent | 2ae68f97446ff6bae5fbbe463eb00312598be840 (diff) | |
download | rpg-93eefc2f33c3ee04c61c03932b74586fa412463c.tar.gz rpg-93eefc2f33c3ee04c61c03932b74586fa412463c.tar.bz2 |
generate password if wanted on usermodify FS#1873
Diffstat (limited to 'lib/plugins')
-rw-r--r-- | lib/plugins/usermanager/admin.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/plugins/usermanager/admin.php b/lib/plugins/usermanager/admin.php index 984700d41..df13f65e3 100644 --- a/lib/plugins/usermanager/admin.php +++ b/lib/plugins/usermanager/admin.php @@ -398,7 +398,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { } } else { if (!empty($mail)){ - return false; + return false; } } @@ -506,6 +506,11 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { } } + // generate password if left empty and notification is on + if(!empty($_REQUEST['usernotify']) && empty($newpass)){ + $newpass = auth_pwgen(); + } + if (!empty($newpass) && $this->_auth->canDo('modPass')) $changes['pass'] = $newpass; if (!empty($newname) && $this->_auth->canDo('modName') && $newname != $oldinfo['name']) |