From b2b95d6cd39e0cde6dfc7aeeeb9e33dea1c0148e Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 5 Jul 2010 05:42:35 +0000 Subject: [PATCH] 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 --- gosa-core/plugins/admin/users/class_userManagement.inc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 -- 2.30.2