diff --git a/htdocs/lib/auth.php b/htdocs/lib/auth.php index c7242fe..adb5242 100644 --- a/htdocs/lib/auth.php +++ b/htdocs/lib/auth.php @@ -7,12 +7,18 @@ if (empty($_SESSION['login'])) { header("location: auth.php\n\n"); exit(0); } else { - if (!$server = new LdapServer($_SESSION['login'])) { - print "
Erreur de connexion LDAP !
"; - exit(1); - } else { + try { + $server = new LdapServer($_SESSION['login']); if (!empty($_GET['domain'])) { - $domain = new LdapDomain($server, Html::clean($_GET['domain'])); + try { + $domain = new LdapDomain($server, Html::clean($_GET['domain'])); + } catch (Exception $e_d) { + print '