From: hickert Date: Tue, 11 Sep 2007 09:18:02 +0000 (+0000) Subject: Force password set if samba password attributes are missing X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=28c81c2933cc2f6a02b5a3427f6f1d56af35c1bf;p=gosa.git Force password set if samba password attributes are missing git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7249 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/personal/samba/class_sambaAccount.inc b/plugins/personal/samba/class_sambaAccount.inc index 3adfb1d7a..1a29a01a4 100644 --- a/plugins/personal/samba/class_sambaAccount.inc +++ b/plugins/personal/samba/class_sambaAccount.inc @@ -722,6 +722,19 @@ class sambaAccount extends plugin } + /* Force password set, if this account doesn't have any samba passwords */ + function password_change_needed() + { + $ldap = $this->config->get_ldap_link(); + $ldap->cat($this->dn,array("sambaLMPassword","sambaNTPassword")); + $attrs = $ldap->fetch(); + if(!isset($attrs['sambaLMPassword']) || !isset($attrs['sambaNTPassword'])){ + return(TRUE); + } + return(FALSE); + } + + /* Save data to object */ function save_object() {