diff options
-rw-r--r-- | inc/auth/ad.class.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/inc/auth/ad.class.php b/inc/auth/ad.class.php index 9ffd3e18b..1fddad243 100644 --- a/inc/auth/ad.class.php +++ b/inc/auth/ad.class.php @@ -286,11 +286,13 @@ class auth_ad extends auth_basic { if(isset($changes['mail'])){ $adchanges['email'] = $changes['mail']; } - try { - $return = $return & $this->adldap->user_modify($user,$adchanges); - } catch (adLDAPException $e) { - if ($this->cnf['debug']) msg('AD Auth: '.$e->getMessage(), -1); - $return = false; + if(count($adchanges)){ + try { + $return = $return & $this->adldap->user_modify($user,$adchanges); + } catch (adLDAPException $e) { + if ($this->cnf['debug']) msg('AD Auth: '.$e->getMessage(), -1); + $return = false; + } } return $return; |