Skip to content
Snippets Groups Projects
Commit f3fccbc9 authored by Peter Rotich's avatar Peter Rotich
Browse files

Try auto-login ONLY if params exists

change tryLogin to simply login
parent 62419040
No related branches found
No related tags found
No related merge requests found
......@@ -134,7 +134,7 @@ class Client {
return (($id=self::getLastTicketIdByEmail($email)))?self::lookup($id, $email):null;
}
/* static */ function tryLogin($ticketID, $email, $auth=null) {
/* static */ function login($ticketID, $email, $auth=null) {
global $ost;
$cfg = $ost->getConfig();
......
......@@ -21,8 +21,10 @@ define('OSTCLIENTINC',TRUE); //make includes happy
require_once(INCLUDE_DIR.'class.client.php');
require_once(INCLUDE_DIR.'class.ticket.php');
if ($_POST) ClientSession::tryLogin($_POST['lticket'], $_POST['lemail']);
else ClientSession::tryLogin($_GET['t'], $_GET['e'], $_GET['a']);
if ($_POST)
Client::login($_POST['lticket'], $_POST['lemail']);
elseif($_GET['t'] && $_GET['e'] && $_GET['a'])
Client::login($_GET['t'], $_GET['e'], $_GET['a']);
$nav = new UserNav();
$nav->setActiveNav('status');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment