summaryrefslogtreecommitdiff
path: root/inc/auth.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/auth.php')
-rw-r--r--inc/auth.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/inc/auth.php b/inc/auth.php
index 6bc4f8673..f2de4424e 100644
--- a/inc/auth.php
+++ b/inc/auth.php
@@ -194,10 +194,11 @@ function auth_login($user,$pass,$sticky=false,$silent=false){
}else{
// read cookie information
list($user,$sticky,$pass) = auth_getCookie();
- // get session info
- $session = $_SESSION[DOKU_COOKIE]['auth'];
if($user && $pass){
// we got a cookie - see if we can trust it
+
+ // get session info
+ $session = $_SESSION[DOKU_COOKIE]['auth'];
if(isset($session) &&
$auth->useSessionCache($user) &&
($session['time'] >= time()-$conf['auth_security_timeout']) &&