summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1ee43f5)
raw | patch | inline | side by side (parent: 1ee43f5)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 10 Dec 2008 09:32:52 +0000 (09:32 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 10 Dec 2008 09:32:52 +0000 (09:32 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13233 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/plugins/admin/users/class_userManagement.inc | patch | blob | history |
diff --git a/gosa-core/plugins/admin/users/class_userManagement.inc b/gosa-core/plugins/admin/users/class_userManagement.inc
index 1171849cc1d3a269292e117d3f5e5937dcfd27da..9bf6ea459397f7dd5fdd00d1b43a1de3b0257c72 100644 (file)
/* Get entry check current status */
$val = $this->list[$s_entry];
if (!preg_match("/w/",$this->ui->get_permissions($val['dn'],"users/password"))){
- msg_dialog::display(_("Password change"),
+ msg_dialog::display(_("Password locking"),
_("You have no permission to change the lock status for this user!"),WARNING_DIALOG);
}else{
$pwd = $val['userPassword'][0];
$method = passwordMethod::get_method($pwd,$val['dn']);
+ $success= false;
if($method instanceOf passwordMethod){
if($method->is_locked($this->config,$val['dn'])){
- $method->unlock_account($this->config,$val['dn']);
+ $success= $method->unlock_account($this->config,$val['dn']);
}else{
- $method->lock_account($this->config,$val['dn']);
+ $success= $method->lock_account($this->config,$val['dn']);
+ }
+
+ /* Check for success */
+ if (!$success){
+ $hn= $method->get_hash_name();
+ if (is_array($hn)){
+ $hn= $hn[0];
+ }
+ msg_dialog::display(_("Password locking"),
+ sprintf(_("Password method '%s' does not support locking. Account has not been locked!"), $hn),WARNING_DIALOG);
}
}else{
// Can't lock unknown methods.
}
+
}
}