summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 03208c6)
raw | patch | inline | side by side (parent: 03208c6)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 4 Oct 2010 11:55:55 +0000 (11:55 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 4 Oct 2010 11:55:55 +0000 (11:55 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19908 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/password-methods/class_password-methods.inc | patch | blob | history | |
gosa-core/plugins/personal/password/class_password.inc | patch | blob | history |
diff --git a/gosa-core/include/password-methods/class_password-methods.inc b/gosa-core/include/password-methods/class_password-methods.inc
index b933300e1fc82afe60bd24faf204069a69d29408..ffcff6799b0d86800cbea41f85de032a03736b0e 100644 (file)
$sambaLMPassword = preg_replace("/^[!]*(.*$)/","!\\1",$sambaLMPassword);
$sambaNTPassword = preg_replace("/^[!]*(.*$)/","!\\1",$sambaNTPassword);
$ldap->cd($dn);
+
+ $pwdClass = new password($config, $dn);
+ $pwdClass->callHook($pwdClass, 'PRELOCK',array(), $ret);
$ldap->modify(
array(
"userPassword" => $userPassword,
"sambaLMPassword" => $sambaLMPassword,
"sambaNTPassword" => $sambaNTPassword));
+
+ if($ldap->success()){
+ $pwdClass->callHook($pwdClass, 'POSTLOCK',array(), $ret);
+ print_a($ret);
+ }
return($ldap->success());
+
}
return(FALSE);
}
$userPassword = preg_replace("/(^[^\}]+\})!(.*$)/","\\1\\2",$userPassword);
$sambaLMPassword = preg_replace("/^[!]*(.*$)/","\\1",$sambaLMPassword);
$sambaNTPassword = preg_replace("/^[!]*(.*$)/","\\1",$sambaNTPassword);
+
+ $pwdClass = new password($config, $dn);
+ $pwdClass->callHook($pwdClass, 'PREUNLOCK',array(), $ret);
+
$ldap->cd($dn);
$ldap->modify(
array(
"userPassword" => $userPassword,
"sambaLMPassword" => $sambaLMPassword,
"sambaNTPassword" => $sambaNTPassword));
+ if($ldap->success()){
+ $pwdClass = new password($config, $dn);
+ $pwdClass->callHook($pwdClass, 'POSTUNLOCK',array(), $ret);
+ }
return($ldap->success());
}
return(FALSE);
diff --git a/gosa-core/plugins/personal/password/class_password.inc b/gosa-core/plugins/personal/password/class_password.inc
index 2833de2ecaac6e1f915588f10807e056d1ffb8b1..7645b8217b0e6dcabe6b7ffad1eaa6861a29b2a0 100644 (file)
static function plInfo()
{
return (array(
- "plDescription" => _("User password"),
- "plSelfModify" => TRUE,
- "plDepends" => array("user"),
- "plPriority" => 10,
+ "plDescription" => _("User password"),
+ "plSelfModify" => TRUE,
+ "plDepends" => array("user"),
+ "plPriority" => 10,
"plSection" => array("personal" => _("My account")),
"plCategory" => array("users"),
- "plOptions" => array(),
+ "plOptions" => array(),
+ "plProperties" => array(
+ array(
+ "name" => "PRELOCK",
+ "type" => "command",
+ "default" => "",
+ "description" => "",
+ "check" => "gosaProperty::isCommand",
+ "migrate" => "",
+ "group" => "password",
+ "mandatory" => FALSE),
+ array(
+ "name" => "POSTLOCK",
+ "type" => "command",
+ "default" => "",
+ "description" => "",
+ "check" => "gosaProperty::isCommand",
+ "migrate" => "",
+ "group" => "password",
+ "mandatory" => FALSE),
+ array(
+ "name" => "PREUNLOCK",
+ "type" => "command",
+ "default" => "",
+ "description" => "",
+ "check" => "gosaProperty::isCommand",
+ "migrate" => "",
+ "group" => "password",
+ "mandatory" => FALSE),
+ array(
+ "name" => "POSTUNLOCK",
+ "type" => "command",
+ "default" => "",
+ "description" => "",
+ "check" => "gosaProperty::isCommand",
+ "migrate" => "",
+ "group" => "password",
+ "mandatory" => FALSE)
+ ),
"plProvidedAcls" => array())
);
}