summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--inc/auth.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/inc/auth.php b/inc/auth.php
index d82b8b5dd..92a56e163 100644
--- a/inc/auth.php
+++ b/inc/auth.php
@@ -54,16 +54,17 @@ function auth_setup() {
}
}
- if(!$auth){
+ if(!isset($auth) || !$auth){
msg($lang['authtempfail'], -1);
return false;
}
- if ($auth && $auth->success == false) {
+ if ($auth->success == false) {
// degrade to unauthenticated user
unset($auth);
auth_logoff();
msg($lang['authtempfail'], -1);
+ return false;
}
// do the login either by cookie or provided credentials XXX