Skip to content

Commit

Permalink
Fixed issue where user fails to be added to dns-ui if LDAP server
Browse files Browse the repository at this point in the history
doesn't return an e-mail address for the user.
  • Loading branch information
Mark Evans committed Dec 8, 2020
1 parent fb591d7 commit 756321c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion model/user.php
Expand Up @@ -156,7 +156,11 @@ public function get_details_from_ldap() {
$this->auth_realm = 'LDAP';
$this->uid = $ldapuser[strtolower($config['ldap']['user_id'])];
$this->name = $ldapuser[strtolower($config['ldap']['user_name'])];
$this->email = $ldapuser[strtolower($config['ldap']['user_email'])];
if (isset($ldapuser[strtolower($config['ldap']['user_email'])])) {
$this->email = $ldapuser[strtolower($config['ldap']['user_email'])];
} else {
$this->email = '';
}
if(isset($config['ldap']['user_active'])) {
$this->active = 0;
if(isset($config['ldap']['user_active_true'])) {
Expand Down

0 comments on commit 756321c

Please sign in to comment.