summaryrefslogtreecommitdiff
path: root/lib/plugins/usermanager/admin.php
diff options
context:
space:
mode:
authorGina Haeussge <osd@foosel.net>2008-09-01 19:00:41 +0200
committerGina Haeussge <osd@foosel.net>2008-09-01 19:00:41 +0200
commitc3f4fb63f0c18cc70b32c658198dff3cc105c682 (patch)
tree95b956b4f7bc7507fefadc18715002c18ce2641d /lib/plugins/usermanager/admin.php
parent46c0ed7427c2ff2f45d7ec1a61cfb3b3dd92c914 (diff)
downloadrpg-c3f4fb63f0c18cc70b32c658198dff3cc105c682.tar.gz
rpg-c3f4fb63f0c18cc70b32c658198dff3cc105c682.tar.bz2
Usermanager: Add autogeneration of password
The password of a newly added user account is now autogenerated if the backend supports it, the password field is left empty and the notification of the user is enabled. A corresponding note was added to the dialog to inform admins about this behaviour. darcs-hash:20080901170041-2b4f5-e66173fe74395a1dab8e6deaf59541d258d4bacb.gz
Diffstat (limited to 'lib/plugins/usermanager/admin.php')
-rw-r--r--lib/plugins/usermanager/admin.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/plugins/usermanager/admin.php b/lib/plugins/usermanager/admin.php
index 1d35c7abe..8f1016cbf 100644
--- a/lib/plugins/usermanager/admin.php
+++ b/lib/plugins/usermanager/admin.php
@@ -283,6 +283,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
$this->_htmlInputField($cmd."_usergroups","usergroups",$this->lang["user_groups"],$groups,$this->_auth->canDo("modGroups"),$indent+6);
if ($this->_auth->canDo("modPass")) {
+ $notes[] = $this->lang['note_pass'];
if ($user) {
$notes[] = $this->lang['note_notify'];
}
@@ -341,7 +342,14 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
list($user,$pass,$name,$mail,$grps) = $this->_retrieveUser();
if (empty($user)) return false;
- if (empty($pass) || empty($name) || empty($mail)){
+ if (empty($pass)){
+ if(!empty($_REQUEST['usernotify'])){
+ $pass = auth_pwgen();
+ } else {
+ return false;
+ }
+ }
+ if (empty($name) || empty($mail)){
msg($this->lang['add_fail'], -1);
return false;
}