Loading lib/validationData.php +4 −6 Original line number Diff line number Diff line Loading @@ -2,14 +2,12 @@ // lookup real names from sid's using campus ldap function lookupSID($sid) { $ds = ldap_connect("ccs-suld1.swan.ac.uk"); $ldappw = file_get_contents("/etc/unildap.secret"); $ldappw = trim($ldappw); ldap_bind($ds, "cn=SUCS-BIND,ou=ServiceAccount,o=SWANUNI", $ldappw); $sr = ldap_search($ds, "ou=students,ou=Swansea,o=swanuni", "uid=" . $sid); $ds = ldap_connect("192.168.10.16"); ldap_bind($ds); $sr = ldap_search($ds, "ou=Active,ou=Resources,o=Swansea", "uid=" . $sid); $info = ldap_get_entries($ds, $sr); ldap_unbind($ds); return ucwords(strtolower($info[0]['givenname'][0] . " " . $info[0]['sn'][0])); return ucwords(strtolower($info[0]['givenName'][0] . " " . $info[0]['sn'][0])); } // lookup addresses from postcodes using the university's website Loading Loading
lib/validationData.php +4 −6 Original line number Diff line number Diff line Loading @@ -2,14 +2,12 @@ // lookup real names from sid's using campus ldap function lookupSID($sid) { $ds = ldap_connect("ccs-suld1.swan.ac.uk"); $ldappw = file_get_contents("/etc/unildap.secret"); $ldappw = trim($ldappw); ldap_bind($ds, "cn=SUCS-BIND,ou=ServiceAccount,o=SWANUNI", $ldappw); $sr = ldap_search($ds, "ou=students,ou=Swansea,o=swanuni", "uid=" . $sid); $ds = ldap_connect("192.168.10.16"); ldap_bind($ds); $sr = ldap_search($ds, "ou=Active,ou=Resources,o=Swansea", "uid=" . $sid); $info = ldap_get_entries($ds, $sr); ldap_unbind($ds); return ucwords(strtolower($info[0]['givenname'][0] . " " . $info[0]['sn'][0])); return ucwords(strtolower($info[0]['givenName'][0] . " " . $info[0]['sn'][0])); } // lookup addresses from postcodes using the university's website Loading