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

Merge branch 'issue/267' into feature/auto-login

parents 8589127a 3c20dcb4
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();
......
......@@ -22,7 +22,7 @@
<h3><?php echo Format::htmlchars($msg); ?></h3>
<form action="login.php" method="post">
<?php csrf_token(); ?>
<input type="hidden" name="d"o value="scplogin">
<input type="hidden" name="do" value="scplogin">
<fieldset>
<input type="text" name="username" id="name" value="" placeholder="username" autocorrect="off" autocapitalize="off">
<input type="password" name="passwd" id="pass" placeholder="password" autocorrect="off" autocapitalize="off">
......
......@@ -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.
Finish editing this message first!
Please register or to comment