Use new class for lib/auth.php
This commit is contained in:
parent
5b8ab54e33
commit
8702999ba9
|
@ -7,5 +7,10 @@ if (empty($_SESSION['login'])) {
|
||||||
header("location: auth.php\n\n");
|
header("location: auth.php\n\n");
|
||||||
exit(0);
|
exit(0);
|
||||||
} else {
|
} else {
|
||||||
$login = $_SESSION['login'];
|
if ($server = new LdapServer($_SESSION['login'])) {
|
||||||
|
$domains = $server->getDomains();
|
||||||
|
} else {
|
||||||
|
print "<div class=\"alert alert-danger\" role=\"alert\">Erreur de connexion LDAP !</div>";
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue