From: hickert Date: Mon, 5 Jul 2010 05:42:35 +0000 (+0000) Subject: Updated passwordHook handling. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=b2b95d6cd39e0cde6dfc7aeeeb9e33dea1c0148e;p=gosa.git Updated passwordHook handling. - $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 --- diff --git a/gosa-core/plugins/admin/users/class_userManagement.inc b/gosa-core/plugins/admin/users/class_userManagement.inc index 74e9c392b..51dc848bb 100644 --- a/gosa-core/plugins/admin/users/class_userManagement.inc +++ b/gosa-core/plugins/admin/users/class_userManagement.inc @@ -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