diff --git a/include/class.client.php b/include/class.client.php index 5c5f3035ee6b485d6862950b35924f00e0f90b97..8b0a4dbeedd1eef2d1e3ca324e07866c52e1bba9 100644 --- a/include/class.client.php +++ b/include/class.client.php @@ -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(); diff --git a/include/staff/login.tpl.php b/include/staff/login.tpl.php index 2b4d21ad015f1e2d6124c8a3422572bcce53d91e..b7fe6fe6ea12cf56e90567dbefcb625dbe8c605c 100644 --- a/include/staff/login.tpl.php +++ b/include/staff/login.tpl.php @@ -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"> diff --git a/login.php b/login.php index f35693fd4083401a1aea72125e8cb1cc116710c7..560f88d9dac88018e505be4a9191d098ebd23ced 100644 --- a/login.php +++ b/login.php @@ -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');