diff --git a/model/user.php b/model/user.php index d570e3b..201028c 100644 --- a/model/user.php +++ b/model/user.php @@ -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'])) {