Browse Source

write log message, if original value was changed

remotes/origin/fix-10825
Arthur Schiwon 12 years ago
parent
commit
34761dabb1
  1. 8
      apps/user_ldap/lib/wizard.php

8
apps/user_ldap/lib/wizard.php

@ -172,6 +172,9 @@ class Wizard extends LDAPUtility {
if($count > 0) { if($count > 0) {
return false; return false;
} }
$writeLog = true;
} else {
$writeLog = false;
} }
$emailAttributes = array('mail', 'mailPrimaryAddress'); $emailAttributes = array('mail', 'mailPrimaryAddress');
@ -187,6 +190,11 @@ class Wizard extends LDAPUtility {
if($winner !== '') { if($winner !== '') {
$this->result->addChange('ldap_email_attr', $winner); $this->result->addChange('ldap_email_attr', $winner);
if($writeLog) {
\OCP\Util::writeLog('user_ldap', 'The mail attribute has ' .
'automatically been reset, because the original value ' .
'did not return any results.', \OCP\Util::INFO);
}
} }
return $winner; return $winner;

Loading…
Cancel
Save