X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=gosa-core%2Fplugins%2Fadmin%2Fusers%2Fclass_userManagement.inc;h=be15e04cdb2e1ea03ce37c7bcd84d950a7f875ee;hb=3f6e9871ce3d4e550302d08740d251dad9735396;hp=eba470ebf957eaf0db7aaef90fe6bf16e83afd72;hpb=7d5c90da4872d437dca8b4564e1169bff3a5bd89;p=gosa.git
diff --git a/gosa-core/plugins/admin/users/class_userManagement.inc b/gosa-core/plugins/admin/users/class_userManagement.inc
index eba470ebf..be15e04cd 100644
--- a/gosa-core/plugins/admin/users/class_userManagement.inc
+++ b/gosa-core/plugins/admin/users/class_userManagement.inc
@@ -124,7 +124,8 @@ class userManagement extends management
function editEntry($action="",$target=array(),$all=array(), $altTabClass ="", $altTabType = "", $altAclCategory="")
{
- management::editEntry($action,$target);
+ $str = management::editEntry($action,$target);
+ if($str) return($str);
if(preg_match("/^edit_/",$action)){
$tab = preg_replace("/^edit_/","",$action);
@@ -293,7 +294,19 @@ class userManagement extends management
*/
function saveChanges()
{
- management::saveChanges();
+ $str = management::saveChanges();
+
+ if(!empty($str)) return($str);
+
+ if($this->last_tabObject instanceOf multi_plug){
+ foreach($this->last_tabObject->a_handles as $user){
+ if($user->password_change_needed()){
+ $this->force_hash_type[$user->dn] = $user->by_object['user']->pw_storage;
+ $this->pwd_change_queue[] = $user->dn;
+ }
+ }
+ return($this->handlePasswordQueue());
+ }
if(isset($this->last_tabObject->by_object['user']) && $this->last_tabObject->by_object['user']->password_change_needed()){
$this->force_hash_type[$this->last_tabObject->dn] = $this->last_tabObject->by_object['user']->pw_storage;
@@ -304,9 +317,12 @@ class userManagement extends management
function cancelEdit()
{
- management::cancelEdit();
+ $str = management::cancelEdit();
+ if(!empty($str)) return($str);
- if(isset($this->last_tabObject->by_object['user']) && $this->last_tabObject->by_object['user']->password_change_needed()){
+ if(isset($this->last_tabObject->by_object['user']) &&
+ $this->last_tabObject->by_object['user']->dn != "new" &&
+ $this->last_tabObject->by_object['user']->password_change_needed()){
$this->force_hash_type[$this->last_tabObject->dn] = $this->last_tabObject->by_object['user']->pw_storage;
$this->pwd_change_queue[] = $this->last_tabObject->dn;
return($this->handlePasswordQueue());
@@ -321,7 +337,8 @@ class userManagement extends management
function newUserFromTemplate($action="",$target=array(),$all=array())
{
// Call parent method, it knows whats to do, locking and so on ...
- management::newEntry($action,$target,$all);
+ $str = management::newEntry($action,$target,$all);
+ if(!empty($str)) return($str);
// Reset uid selection.
$this->got_uid= "";
@@ -357,7 +374,8 @@ class userManagement extends management
{
// Call parent method, it manages everything, locking, object creation...
- management::newEntry($action,$target,$all);
+ $str = management::newEntry($action,$target,$all);
+ if(!empty($str)) return($str);
// If we've at least one template, then ask the user if he wants to use one?
$templates = array();
@@ -365,7 +383,7 @@ class userManagement extends management
$templates = array_merge($templates,$this->get_templates());
// Display template selection
- if (count($templates)){
+ if (count($templates) > 1){
$smarty = get_smarty();
// Set default variables, normally empty.
@@ -534,6 +552,7 @@ class userManagement extends management
// Check entry locking
foreach($target as $dn){
if (($user= get_lock($dn)) != ""){
+ $this->dn = $dn;
return(gen_locked_message ($user, $dn));
}
$this->dns[] = $dn;
@@ -582,6 +601,7 @@ class userManagement extends management
*/
function lockUsers($action,$target,$all)
{
+ if(!count($target)) return;
if($action == "lockUsers"){
$this->lockEntry($action,$target, $all, "lock");
}else{
@@ -766,11 +786,9 @@ class userManagement extends management
// Walk thru map
foreach ($map as $oc => $properties) {
if (in_array_ics($oc, $classes)) {
- $result.="";
+ $result.= image($properties['image'], "listing_edit_".$properties['plugin']."_$row", $properties['title']);
} else {
- $result.="
";
+ $result.= image('images/empty.png');
}
}
return $result;