mirror of
https://github.com/stylersnico/librenms.git
synced 2026-08-03 08:01:38 +02:00
avoid error on ldap bind when session has expired
git-svn-id: http://www.observium.org/svn/observer/trunk@596 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -26,6 +26,8 @@ if($_COOKIE['username'] && $_COOKIE['password']){
|
||||
|
||||
$auth_success = 0;
|
||||
|
||||
if ($_SESSION['username'])
|
||||
{
|
||||
if ($config['auth_mechanism'] == "mysql" || !$config['auth_mechanism'])
|
||||
{
|
||||
$encrypted = md5($_SESSION['password']);
|
||||
@@ -52,6 +54,7 @@ else
|
||||
echo "ERROR: no valid auth_mechanism defined.";
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
||||
if ($auth_success) {
|
||||
$sql = "SELECT * FROM `users` WHERE `username`='".$_SESSION['username']."'";
|
||||
|
||||
Reference in New Issue
Block a user