[SUCS Devel] site r631 - branches/sucs-site/lib

imranh at sucs.org imranh at sucs.org
Sat Jan 10 19:26:54 GMT 2015


Author: imranh
Date: 2015-01-10 19:26:54 +0000 (Sat, 10 Jan 2015)
New Revision: 631

Modified:
   branches/sucs-site/lib/ldap-auth.php
Log:
Moved the variables inside the function

Modified: branches/sucs-site/lib/ldap-auth.php
===================================================================
--- branches/sucs-site/lib/ldap-auth.php	2015-01-10 19:21:28 UTC (rev 630)
+++ branches/sucs-site/lib/ldap-auth.php	2015-01-10 19:26:54 UTC (rev 631)
@@ -29,21 +29,21 @@
 // we don't care about warnings, we write our own
 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';
+function ldapAuth($username, $password) {
 
-// ldap servers
-$sucsLDAPServer = 'silver.sucs.swan.ac.uk';
-$lisLDAPServer = 'ccs-suld1.swan.ac.uk';
+	// ldap servers
+	$sucsLDAPServer = 'silver.sucs.swan.ac.uk';
+	$lisLDAPServer = 'ccs-suld1.swan.ac.uk';
 
-function ldapAuth($username, $password) {
-
 	// lis auth stuffs
 	$lisUsernameOu = substr($username, -1);
 	$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
 
 	// Try and connect to silver




More information about the Devel mailing list