summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f0cd328)
raw | patch | inline | side by side (parent: f0cd328)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 16 Aug 2007 07:45:12 +0000 (07:45 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 16 Aug 2007 07:45:12 +0000 (07:45 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7064 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/users/class_divListUsers.inc | patch | blob | history | |
plugins/admin/users/class_userManagement.inc | patch | blob | history |
diff --git a/plugins/admin/users/class_divListUsers.inc b/plugins/admin/users/class_divListUsers.inc
index c796b1869d86943f08549e7d2fa6375e4b177d56..35b057b2766aeda1a13401817d6157de205ea0ff 100644 (file)
/* Multiple options */
$listhead .= " <input class='center' type='image' align='middle' src='images/edittrash.png'
title='"._("Remove selected user")."' alt='"._("Remove user")."' name='remove_multiple_users'> ";
+ $listhead .= " <input class='center' type='image' align='middle' src='images/list_password.png'
+ title='"._("Change password")."' alt='"._("Change password")."' name='multiple_password_change'> ";
/* Add multiple copy & cut icons */
if(is_object($this->parent->CopyPasteHandler) && preg_match("/(c.*w|w.*c)/",$acl_all)){
diff --git a/plugins/admin/users/class_userManagement.inc b/plugins/admin/users/class_userManagement.inc
index ffc1a34791484fa6377d49dc2ceb9cb1cb01c3d3..57b3cf06ad858358c1d3e1b1e18db0d9f7de3c65 100644 (file)
var $CPPasswordChange = ""; // Contains the entry id which should get a new password
var $DivListUsers;
+ var $pwd_change_queue = array();
+
var $start_pasting_copied_objects = FALSE;
function userManagement($config, $ui)
"editPaste" => "editPaste",
"copy_multiple" => "multiple_copy_users",
"cut_multiple" => "multiple_cut_users",
+ "multiple_password_change" => "multiple_password_change",
"copy" => "^copy",
"toggle_lock_status" => "toggle_lock_status",
"cut" => "^cut") as $act => $name){
}
- /********************
- Change password requested
- ********************/
-
- /* Password change requested */
- if (($s_action == "change_pw") || (!empty($this->CPPasswordChange))){
-
- if(!empty($this->CPPasswordChange)){
- $s_entry = $this->CPPasswordChange;
- $this->CPPasswordChange = "";
- }
-
- /* Get 'dn' from posted 'uid' */
- $this->dn= $this->list[trim($s_entry)]['dn'];
-
- /* Load permissions for selected 'dn' and check if
- we're allowed to remove this 'dn' */
- if (preg_match("/w/",$this->ui->get_permissions($this->dn,"users/password"))){
-
- /* User is allowed to change passwords, save 'dn' and 'acl' for next
- dialog. */
- $_SESSION['objectinfo']= $this->dn;
- return ($smarty->fetch(get_template_path('password.tpl', TRUE)));
-
- } else {
- /* User is not allowed. Show message and cancel. */
- print_red (_("You are not allowed to set this users password!"));
- }
- }
-
-
/********************
Change password confirmed
********************/
}
+ /********************
+ Change multiple passwords requested
+ ********************/
+
+ if($s_action == "multiple_password_change"){
+ $this->pwd_change_queue = $this->list_get_selected_items();
+ }
+
+
+ /********************
+ Change password requested
+ ********************/
+
+ /* Password change requested */
+ if (($s_action == "change_pw") || (!empty($this->CPPasswordChange)) || count($this->pwd_change_queue)){
+
+ /* Get users whose passwords should be changed. */
+ if(count($this->pwd_change_queue)){
+ $s_entry= array_pop($this->pwd_change_queue);
+ }
+
+ if(!empty($this->CPPasswordChange)){
+ $s_entry = $this->CPPasswordChange;
+ $this->CPPasswordChange = "";
+ }
+
+ /* Get 'dn' from posted 'uid' */
+ $this->dn= $this->list[trim($s_entry)]['dn'];
+
+ /* Load permissions for selected 'dn' and check if
+ we're allowed to remove this 'dn' */
+ if (preg_match("/w/",$this->ui->get_permissions($this->dn,"users/password"))){
+
+ /* User is allowed to change passwords, save 'dn' and 'acl' for next
+ dialog. */
+ $_SESSION['objectinfo']= $this->dn;
+ return ($smarty->fetch(get_template_path('password.tpl', TRUE)));
+
+ } else {
+ /* User is not allowed. Show message and cancel. */
+ print_red (_("You are not allowed to set this users password!"));
+ }
+ }
+
+
+
+
/********************
Edit existing entry
********************/