[SUCS Devel] [Git][sucssite/sucs-site][master] Update sucs iss ldap info for signup system

Imran Hussain imranh at sucs.org
Tue Sep 19 16:49:26 BST 2017


Imran Hussain pushed to branch master at sucssite / sucs-site


Commits:
83f35798 by Imran Hussain at 2017-09-19T16:49:23+01:00
Update sucs iss ldap info for signup system 
- - - - -


1 changed file:

- lib/validationData.php


Changes:

=====================================
lib/validationData.php
=====================================
--- a/lib/validationData.php
+++ b/lib/validationData.php
@@ -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



View it on GitLab: https://projects.sucs.org/sucssite/sucs-site/commit/83f35798bbde0c1d14a1bf3ffd966e18917ba558

---
View it on GitLab: https://projects.sucs.org/sucssite/sucs-site/commit/83f35798bbde0c1d14a1bf3ffd966e18917ba558
You're receiving this email because of your account on projects.sucs.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sucs.org/pipermail/devel/attachments/20170919/c11c2b27/attachment.html>


More information about the Devel mailing list