From 627ab2ec60eea7f265d3a3f9b6d51a09bff1f1b8 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 11 Sep 2007 09:56:40 +0000 Subject: [PATCH] Only call password_change_needed if samba account ist new git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7252 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/personal/samba/class_sambaAccount.inc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/plugins/personal/samba/class_sambaAccount.inc b/plugins/personal/samba/class_sambaAccount.inc index 1a29a01a4..b01a852cc 100644 --- a/plugins/personal/samba/class_sambaAccount.inc +++ b/plugins/personal/samba/class_sambaAccount.inc @@ -725,11 +725,13 @@ 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); + if(!$this->initially_was_account && $this->is_account){ + $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); } -- 2.30.2