Commit 9889f2a3 authored by Benoit Mortier's avatar Benoit Mortier
Browse files

Fixes: #990 when the keyword is missing we get php errors in salspassword method

Showing with 2 additions and 3 deletions
+2 -3
...@@ -33,8 +33,7 @@ class passwordMethodsasl extends passwordMethod { ...@@ -33,8 +33,7 @@ class passwordMethodsasl extends passwordMethod {
$this->realm = trim($config->get_cfg_value('saslRealm',"")); $this->realm = trim($config->get_cfg_value('saslRealm',""));
$this->exop = trim($config->get_cfg_value('saslExop',"")); $this->exop = trim($config->get_cfg_value('saslExop',""));
if (empty($this->realm) && empty($this->exop)) { if (empty($this->realm) && empty($this->exop)) {
trigger_error(msgPool::cmdnotfound("saslRealm", _("SASL"))); msg_dialog::display(_("Error"), msgPool::cmdnotfound("saslRealm or saslExop", _("SASL")), ERROR_DIALOG);
trigger_error(msgPool::cmdnotfound("saslExop", _("SASL")));
} }
$attr = (empty($this->exop)?'uid':$this->exop); $attr = (empty($this->exop)?'uid':$this->exop);
...@@ -46,7 +45,7 @@ class passwordMethodsasl extends passwordMethod { ...@@ -46,7 +45,7 @@ class passwordMethodsasl extends passwordMethod {
$attrs = $ldap->fetch(); $attrs = $ldap->fetch();
$this->uid = $attrs[$attr][0]; $this->uid = $attrs[$attr][0];
} else { } else {
trigger_error("Cannot change password, unknown user '".$dn."'"); msg_dialog::display(_("Error"), sprintf(_("Cannot change password, unknown user '%s'"),$dn), ERROR_DIALOG);
} }
} }
......
  • bmortier @bmortier

    mentioned in issue #374 (closed)

    By bmortier on 2017-09-02T14:45:09 (imported from GitLab)

    ·

    mentioned in issue #374 (closed)

    By bmortier on 2017-09-02T14:45:09 (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