diff options
author | redmatrix <git@macgirvin.com> | 2016-04-08 04:44:10 -0700 |
---|---|---|
committer | redmatrix <git@macgirvin.com> | 2016-04-08 04:44:10 -0700 |
commit | 9b66b5eee37c1a3958d9ddccb9c1a06ac7ef49ce (patch) | |
tree | 55a9d412ca70f40e1634413bbe2bf53ce9a4fc42 /include/auth.php | |
parent | 2db59f3b7697d141e6dda0aa85f9161bfee32a2a (diff) | |
download | volse-hubzilla-9b66b5eee37c1a3958d9ddccb9c1a06ac7ef49ce.tar.gz volse-hubzilla-9b66b5eee37c1a3958d9ddccb9c1a06ac7ef49ce.tar.bz2 volse-hubzilla-9b66b5eee37c1a3958d9ddccb9c1a06ac7ef49ce.zip |
objectify all the session management stuff
Diffstat (limited to 'include/auth.php')
-rw-r--r-- | include/auth.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/include/auth.php b/include/auth.php index 228143e12..21f0dded8 100644 --- a/include/auth.php +++ b/include/auth.php @@ -101,7 +101,7 @@ if((isset($_SESSION)) && (x($_SESSION, 'authenticated')) && // process logout request $args = array('channel_id' => local_channel()); call_hooks('logging_out', $args); - nuke_session(); + \Zotlabs\Web\Session::nuke(); info( t('Logged out.') . EOL); goaway(z_root()); } @@ -117,7 +117,7 @@ if((isset($_SESSION)) && (x($_SESSION, 'authenticated')) && intval(ACCOUNT_ROLE_ADMIN) ); if($x) { - new_cookie(60 * 60 * 24); // one day + \Zotlabs\Web\Session::new_cookie(60 * 60 * 24); // one day $_SESSION['last_login_date'] = datetime_convert(); unset($_SESSION['visitor_id']); // no longer a visitor authenticate_success($x[0], true, true); @@ -172,7 +172,7 @@ if((isset($_SESSION)) && (x($_SESSION, 'authenticated')) && // check any difference at all logger('Session address changed. Paranoid setting in effect, blocking session. ' . $_SESSION['addr'] . ' != ' . $_SERVER['REMOTE_ADDR']); - nuke_session(); + \Zotlabs\Web\Session::nuke(); goaway(z_root()); break; } @@ -196,7 +196,7 @@ if((isset($_SESSION)) && (x($_SESSION, 'authenticated')) && } else { $_SESSION['account_id'] = 0; - nuke_session(); + \Zotlabs\Web\Session::nuke(); goaway(z_root()); } } // end logged in user returning @@ -204,7 +204,7 @@ if((isset($_SESSION)) && (x($_SESSION, 'authenticated')) && else { if(isset($_SESSION)) { - nuke_session(); + \Zotlabs\Web\Session::nuke(); } // handle a fresh login request @@ -275,10 +275,10 @@ else { // on the cookie if($_POST['remember_me']) { - new_cookie(31449600); // one year + \Zotlabs\Web\Session::new_cookie(31449600); // one year } else { - new_cookie(0); // 0 means delete on browser exit + \Zotlabs\Web\Session::new_cookie(0); // 0 means delete on browser exit } // if we haven't failed up this point, log them in. |