Commit 5c2bdcb2 authored by jlopez's avatar jlopez
Browse files

Merge branch 'master' of https://gitlab.mbb.univ-montp1.fr/jlopez/wicopa into develop

parents c8d4a8aa eed362d0
...@@ -39,7 +39,7 @@ if($passcode == 1) { ...@@ -39,7 +39,7 @@ if($passcode == 1) {
$ldap = new LDAPquery(); $ldap = new LDAPquery();
$ldappasscode = $ldap->verifyPass($login, $pwd); $ldappasscode = $ldap->verifyPass($login, $pwd);
if($ldappasscode == 1) { if($ldappasscode == 1) {
$_SESSION['username'] = $login; $_SESSION['username'] = $login;
$_SESSION['usercode'] = 3; $_SESSION['usercode'] = 3;
......
...@@ -16,6 +16,7 @@ class LDAPquery { ...@@ -16,6 +16,7 @@ class LDAPquery {
public function openConnection() { public function openConnection() {
$this->ldaph = ldap_connect(Conf::$LDAP_HOSTNAME); $this->ldaph = ldap_connect(Conf::$LDAP_HOSTNAME);
if(!$this->ldaph) { if(!$this->ldaph) {
die("Impossible de se connecter au serveur LDAP ".Conf::$LDAP_HOSTNAME); die("Impossible de se connecter au serveur LDAP ".Conf::$LDAP_HOSTNAME);
} }
...@@ -47,4 +48,4 @@ class LDAPquery { ...@@ -47,4 +48,4 @@ class LDAPquery {
return 0; return 0;
} }
} }
\ No newline at end of file
...@@ -10,7 +10,7 @@ class Conf { ...@@ -10,7 +10,7 @@ class Conf {
public static $DB_PP = ''; public static $DB_PP = '';
// generate an admin password with: echo password|sha1sum|awk '{print $1}'; // generate an "admin" password with: echo password|sha1sum|awk '{print $1}';
public static $KK = "to_replace_with_your_admin_pass"; public static $KK = "to_replace_with_your_admin_pass";
public static $LDAP_HOSTNAME = ''; public static $LDAP_HOSTNAME = '';
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment