Code

Moved from external pwdhook to passwordHook
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 10 Sep 2008 09:43:53 +0000 (09:43 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 10 Sep 2008 09:43:53 +0000 (09:43 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12394 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/FAQ
gosa-core/contrib/gosa.conf
gosa-core/contrib/gosa.conf.5
gosa-core/html/password.php
gosa-core/plugins/admin/users/class_userManagement.inc
gosa-core/plugins/personal/password/class_password.inc

index dded880f2821edf66aa4adcedcc41c2eecdedf02..fde2a3a8fee4cdd0958f8b37e8fb0bc321813129 100644 (file)
@@ -110,7 +110,7 @@ Q: I've to update passwords on external windows PDCs. Can I add a command to let
    synchronize these for me?
 
 A: There's the possibility to add a password hook in gosa.conf's main section using
-   the keyword "externalpwdhook". The specified command will be executed with 
+   the keyword "passwordHook". The specified command will be executed with 
    three parameters: /path/to/your/script username oldpassword newpassword
 
    So you can call i.e. smbpasswd to handle your password change on the PDC.
index 2a2e5c916bd87b2aded29534121fd8a8f0e4974c..528de04464e31b8a567f28ffa370372e7f3fa293 100644 (file)
         passwordMinDiffer="{$cv.pwd_rules.pwdiffer}"
 {/if}
 {if $cv.pwd_rules.externalpwdhook_active}
-        externalpwdhook="{$cv.pwd_rules.externalpwdhook}"
+        passwordHook="{$cv.pwd_rules.externalpwdhook}"
 {/if}
 {if $cv.errorlvl}
         displayerrors="true"
index 7580154b8f510a79b0413eec695f51586538bfb0..4a8c496c7ba140b280fc0f8a798bf3e8936f8759 100644 (file)
@@ -554,11 +554,11 @@ statement determines whether a newly entered password has to be checked
 to have at least n different characters.
 .PP
 
-.B externalpwdhook
+.B passwordHook
 .I path
 .PP
 The
-.I externalpwdhook
+.I passwordHook
 can specify an external script to handle password settings at some other
 location besides the LDAP. It will be called this way:
 
index 13f614b7d0e377df412442a054857f18f94d98d4..0c395960eb4dc4c921bb030ffd830ef86cea9951 100644 (file)
@@ -238,8 +238,8 @@ if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST['apply'])){
 
          /* Passed quality check, just try to change the password now */
          $output= "";
-         if ($config->get_cfg_value("externalpwdhook") != ""){
-                 exec($config->get_cfg_value("externalpwdhook")." ".$ui->username." ".
+         if ($config->get_cfg_value("passwordHook") != ""){
+                 exec($config->get_cfg_value("passwordHook")." ".$ui->username." ".
                                  $_POST['current_password']." ".$_POST['new_password'], $resarr);
                  if(count($resarr) > 0) {
                          $output= join('\n', $resarr);
index 0ce9ca13521ec231de599b1887ece6dcabf40b2c..8114ef094fcf2b04fc257f32903bf181a9a3256b 100644 (file)
@@ -294,8 +294,8 @@ class userManagement extends plugin
             if(!change_password ($this->usertab->dn, $_POST['new_password'],0, $obj->pw_storage)){
               return($smarty->fetch(get_template_path('password.tpl', TRUE)));
             }
-            if ($config->get_cfg_value("externalpwdhook") != ""){
-              exec($config->get_cfg_value("externalpwdhook")." ".$username." ".$_POST['new_password'], $resarr);
+            if ($config->get_cfg_value("passwordHook") != ""){
+              exec($config->get_cfg_value("passwordHook")." ".$username." ".$_POST['new_password'], $resarr);
             }
             new log("modify","users/".get_class($this),$this->usertab->dn,array(),"Password has been changed");
             unset($this->usertab);
@@ -305,8 +305,8 @@ class userManagement extends plugin
           if(!change_password ($this->dn, $_POST['new_password'])){
             return($smarty->fetch(get_template_path('password.tpl', TRUE)));
           }
-          if ($config->get_cfg_value("externalpwdhook") != ""){
-            exec($config->get_cfg_value("externalpwdhook")." ".$username." ".$_POST['new_password'], $resarr);
+          if ($config->get_cfg_value("passwordHook") != ""){
+            exec($config->get_cfg_value("passwordHook")." ".$username." ".$_POST['new_password'], $resarr);
           }
           new log("modify","users/".get_class($this),$this->dn,array(),"Password has been changed");
         }
index ac4a43eebbae10ce5495f23e4e51f8f40d856674..3470ed4129e700b8ec9f0697869373e3ce663ce5 100644 (file)
@@ -63,8 +63,8 @@ class password extends plugin
       $length       = $this->config->get_cfg_value("passwordMinLength", 0);
 
       /* Call external password quality hook ?*/
-      $check_hook   = $this->config->get_cfg_value("externalpwdhook") != "";
-      $hook         = $this->config->get_cfg_value("externalpwdhook")." ".$ui->username." ".$_POST['current_password']." ".$_POST['new_password'];
+      $check_hook   = $this->config->get_cfg_value("passwordHook") != "";
+      $hook         = $this->config->get_cfg_value("passwordHook")." ".$ui->username." ".$_POST['current_password']." ".$_POST['new_password'];
       if($check_hook){
         exec($hook,$resarr);
         $check_hook_output = "";