diff options
author | Christopher Smith <chris@jalakai.co.uk> | 2014-03-05 11:59:25 +0000 |
---|---|---|
committer | Christopher Smith <chris@jalakai.co.uk> | 2014-03-05 11:59:25 +0000 |
commit | 5fc8e2cfee706ae311a4ec4c2b57aa8515bf42e9 (patch) | |
tree | c8a6e3da90dee0f1942b7f2e33ebad7abe776398 /inc/auth.php | |
parent | 5c3bcd038aad2063bd5f467667bc7e620985cb96 (diff) | |
parent | 55a71a16cbfacd3836ca70e37e45f85bd44ceab1 (diff) | |
download | rpg-5fc8e2cfee706ae311a4ec4c2b57aa8515bf42e9.tar.gz rpg-5fc8e2cfee706ae311a4ec4c2b57aa8515bf42e9.tar.bz2 |
Merge pull request #578 from splitbrain/sessionprops
define overridable constants for session properties FS#1913
Diffstat (limited to 'inc/auth.php')
-rw-r--r-- | inc/auth.php | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/inc/auth.php b/inc/auth.php index 8fde129aa..6c4636b2f 100644 --- a/inc/auth.php +++ b/inc/auth.php @@ -528,11 +528,7 @@ function auth_logoff($keepbc = false) { $USERINFO = null; //FIXME $cookieDir = empty($conf['cookiedir']) ? DOKU_REL : $conf['cookiedir']; - if(version_compare(PHP_VERSION, '5.2.0', '>')) { - setcookie(DOKU_COOKIE, '', time() - 600000, $cookieDir, '', ($conf['securecookie'] && is_ssl()), true); - } else { - setcookie(DOKU_COOKIE, '', time() - 600000, $cookieDir, '', ($conf['securecookie'] && is_ssl())); - } + setcookie(DOKU_COOKIE, '', time() - 600000, $cookieDir, '', ($conf['securecookie'] && is_ssl()), true); if($auth) $auth->logOff(); } @@ -1319,11 +1315,8 @@ function auth_setCookie($user, $pass, $sticky) { $cookie = base64_encode($user).'|'.((int) $sticky).'|'.base64_encode($pass); $cookieDir = empty($conf['cookiedir']) ? DOKU_REL : $conf['cookiedir']; $time = $sticky ? (time() + 60 * 60 * 24 * 365) : 0; //one year - if(version_compare(PHP_VERSION, '5.2.0', '>')) { - setcookie(DOKU_COOKIE, $cookie, $time, $cookieDir, '', ($conf['securecookie'] && is_ssl()), true); - } else { - setcookie(DOKU_COOKIE, $cookie, $time, $cookieDir, '', ($conf['securecookie'] && is_ssl())); - } + setcookie(DOKU_COOKIE, $cookie, $time, $cookieDir, '', ($conf['securecookie'] && is_ssl()), true); + // set session $_SESSION[DOKU_COOKIE]['auth']['user'] = $user; $_SESSION[DOKU_COOKIE]['auth']['pass'] = sha1($pass); |