Skip to content

Instantly share code, notes, and snippets.

Created February 16, 2015 21:56
Show Gist options
  • Save anonymous/84e5415e2ffe7451dcab to your computer and use it in GitHub Desktop.
Save anonymous/84e5415e2ffe7451dcab to your computer and use it in GitHub Desktop.
<?php
if(!defined('INITIALIZED'))
exit;
if(isset($_REQUEST['action']) && $_REQUEST['action'] == 'logout')
Visitor::logout();
if(isset($_REQUEST['account_login']) && isset($_REQUEST['password_login']))
{
Visitor::setAccount($_REQUEST['account_login']);
Visitor::setPassword($_REQUEST['password_login']);
//Visitor::login(); // this set account and password from code above as login and password to next login attempt
//Visitor::loadAccount(); // this is required to force reload account and get status of user
$isTryingToLogin = true;
}
Visitor::login();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment