Code

Updated passwordHook handling.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 5 Jul 2010 05:42:35 +0000 (05:42 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 5 Jul 2010 05:42:35 +0000 (05:42 +0000)
- $username  wasn't defined at this stage.
- Added ldap request to fetch the users uid

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18922 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/plugins/admin/users/class_userManagement.inc

index 74e9c392bad56c6a04bf5181459f3c47ab2b9b31..51dc848bbbdd85bb9290e3e53e01c3f854e663a1 100644 (file)
@@ -337,7 +337,11 @@ class userManagement extends management
                     }
                 }
                 if ($this->config->get_cfg_value("core","passwordHook") != ""){
-                    exec($this->config->get_cfg_value("core","passwordHook")." ".$username." ".$new_password, $resarr);
+                    $ldap = $this->config->get_ldap_link();
+                    $ldap->cd($this->config->current['BASE']);
+                    $ldap->cat($this->dn,array('uid'));
+                    $attrs = $ldap->fetch();
+                    exec($this->config->get_cfg_value("core","passwordHook")." ".$attrs['uid'][0]." ".$new_password, $resarr);
                 }
         
                 // The user has to change his password on next login