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

Moved the variables inside the function

parent bf526d1d
No related branches found
No related tags found
No related merge requests found
...@@ -29,21 +29,21 @@ if (isAuthd == "sucs"){ ...@@ -29,21 +29,21 @@ if (isAuthd == "sucs"){
// we don't care about warnings, we write our own // we don't care about warnings, we write our own
error_reporting(E_ERROR | E_PARSE); error_reporting(E_ERROR | E_PARSE);
// how to bind
$sucsBindDn = 'uid=$username,ou=People,dc=sucs,dc=org';
$lisBindDn1 = 'cn=$username,ou=$lisUsernameOu,ou=students,ou=Swansea,o=swanuni';
$lisBindDn2 = 'cn=$username,ou=$lisOtherOu,ou=students,ou=Swansea,o=swanuni';
// ldap servers
$sucsLDAPServer = 'silver.sucs.swan.ac.uk';
$lisLDAPServer = 'ccs-suld1.swan.ac.uk';
function ldapAuth($username, $password) { function ldapAuth($username, $password) {
// ldap servers
$sucsLDAPServer = 'silver.sucs.swan.ac.uk';
$lisLDAPServer = 'ccs-suld1.swan.ac.uk';
// lis auth stuffs // lis auth stuffs
$lisUsernameOu = substr($username, -1); $lisUsernameOu = substr($username, -1);
$lisOtherOu = 'moved'; $lisOtherOu = 'moved';
// how to bind
$sucsBindDn = 'uid=$username,ou=People,dc=sucs,dc=org';
$lisBindDn1 = 'cn=$username,ou=$lisUsernameOu,ou=students,ou=Swansea,o=swanuni';
$lisBindDn2 = 'cn=$username,ou=$lisOtherOu,ou=students,ou=Swansea,o=swanuni';
// Main auth // Main auth
// Try and connect to silver // Try and connect to silver
......
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