Skip to content
Snippets Groups Projects
Commit 9b32b369 authored by Imran Hussain's avatar Imran Hussain
Browse files

Extend ldap script to let people sign in with their emails because for some...

Extend ldap script to let people sign in with their emails because for some people they think username == email adderess
parent 3842ea06
No related branches found
No related tags found
No related merge requests found
......@@ -33,6 +33,13 @@ function ldapAuth($username, $password) {
if ($username != "" && $password != ""){
// people like to use emails to login so lets detect and strip
if(filter_var($username, FILTER_VALIDATE_EMAIL)){
//valid email, lets strip
$parts = explode("@", $username);
$username = $parts[0];
}
// ldap servers
$sucsLDAPServer = 'silver.sucs.swan.ac.uk';
$lisLDAPServer = 'ccs-suld1.swan.ac.uk';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment