diff --git a/inc/plugins/auth_local/auth_local.plugin.php b/inc/plugins/auth_local/auth_local.plugin.php index eb1ddc9b0..a82951add 100644 --- a/inc/plugins/auth_local/auth_local.plugin.php +++ b/inc/plugins/auth_local/auth_local.plugin.php @@ -71,6 +71,10 @@ function authenticate_local() { } function userUsesLDAP() { + if (!isset($_SESSION["userlogin"])) { + return false; + } + global $db; $rowObj = $db->queryRow("SELECT id FROM users WHERE username=" . $db->quote($_SESSION["userlogin"], 'text') . " AND use_ldap=1");