Commit b691d755 authored by Côme Bernigaud's avatar Côme Bernigaud Committed by Benoit Mortier
Browse files

Fixes #3783 Using Password recovery with the Personal plugin fails

Showing with 7 additions and 2 deletions
+7 -2
...@@ -421,11 +421,16 @@ class passwordRecovery { ...@@ -421,11 +421,16 @@ class passwordRecovery {
/* Retrieve dn from the ldap */ /* Retrieve dn from the ldap */
$ldap = $this->config->get_ldap_link(); $ldap = $this->config->get_ldap_link();
if (class_available('personalInfo') && ($this->config->get_cfg_value('privateEmailPasswordRecovery', 'FALSE') == 'TRUE')) {
$filter = '(&(|(objectClass=gosaMailAccount)(objectClass=fdPersonalInfo))(uid='.$this->uid.'))';
} else {
$filter = '(&(objectClass=gosaMailAccount)(uid='.$this->uid.'))';
}
$ldap->cd($this->config->current['BASE']); $ldap->cd($this->config->current['BASE']);
$ldap->search("(&(objectClass=gosaMailAccount)(uid=".$this->uid."))", array("dn")); $ldap->search($filter, array('dn'));
if ($ldap->count() < 1) { if ($ldap->count() < 1) {
$this->message[] = sprintf(_('Did not found an account with login "%s"'), $this->uid); $this->message[] = sprintf(_('Did not find an account with login "%s"'), $this->uid);
return; return;
} elseif ($ldap->count() > 1) { } elseif ($ldap->count() > 1) {
$this->message[] = sprintf(_('Found multiple accounts with login "%s"'), $this->uid); $this->message[] = sprintf(_('Found multiple accounts with login "%s"'), $this->uid);
......
  • bmortier @bmortier

    mentioned in issue #1249

    By zipkid on 2017-09-02T15:19:29 (imported from GitLab)

    ·

    mentioned in issue #1249

    By zipkid on 2017-09-02T15:19:29 (imported from GitLab)

    Toggle commit list
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment