Skip to content

Instantly share code, notes, and snippets.

@a3f
Forked from anonymous/gist:84e5415e2ffe7451dcab
Last active August 29, 2015 14:15
Show Gist options
  • Save a3f/4041066bd72685c9ca2e to your computer and use it in GitHub Desktop.
Save a3f/4041066bd72685c9ca2e 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