Fixed style error

This commit is contained in:
Ben Tyger 2021-05-24 09:45:20 -04:00
parent 4660ff5317
commit a98f65c9f6
2 changed files with 5 additions and 2 deletions

5
.gitignore vendored
View file

@ -139,4 +139,7 @@ resources/database/*.db
resources/sessions/sess_*
logs/log-*.txt
config.php
release.zip
release.zip
/.settings/
/.project
/.buildpath

View file

@ -157,7 +157,7 @@ class LoginController extends AuthController
array('mail',$this->config['ldap']['rdn_attribute'])
);
} else {
$search = ldap_search($server, $this->config['ldap']['base_domain'], ($this->config['ldap']['rdn_attribute'] ?? 'uid=').addslashes($username),['mail']);
$search = ldap_search($server, $this->config['ldap']['base_domain'], ($this->config['ldap']['rdn_attribute'] ?? 'uid=').addslashes($username), ['mail']);
}
$entry = ldap_first_entry($server, $search);
$email = @ldap_get_values($server, $entry, 'mail')[0] ?? platform_mail($username.rand(0, 100)); // if the mail is not set, generate a placeholder