login.tpl hided between my not yet pushed files! You evil login.tpl :D that might fix the auto login problem

--HG--
branch : quitta-gsoc-2013
This commit is contained in:
Quitta 2013-07-31 22:38:47 +02:00
parent 40883e8afc
commit ca769bf24b

View file

@ -0,0 +1,16 @@
<?php
function login(){
if ( helpers :: check_if_game_client () ){
$result = Helpers::check_login_ingame();
if( $result != "FALSE"){
//handle successful login
$_SESSION['user'] = $result['name'];
$_SESSION['id'] = WebUsers::getId($result['id']);
$_SESSION['ticket_user'] = Ticket_User::constr_ExternId($_SESSION['id']);
//go back to the index page.
header( 'Location: index.php' );
exit;
}
}
}