Die Authentifizierung findet in der index.php statt.
Code:
### Start autentication, just if LS is working
$authentication = new auth();
$auth = $authentication->check_logon(); // Testet Cookie / Session ob User eingeloggt ist
$olduserid = $authentication->get_olduserid(); // Olduserid for Switback on Boxes
Der folgende Teil regelt den Ablauf durch den fiktiven Mod "auth".
Code:
if ($_GET['mod']=='auth'){
switch ($_GET['action']){
case 'login':
$auth = $authentication->login($_POST['email'],$_POST['password']);
break;
case 'logout':
$auth = $authentication->logout();
$_GET['mod']='home';
break;
case 'switch_to': // Switch to user
$authentication->switchto($_GET["userid"]);
break;
case 'switch_back': // Switch back to Adminuser
$authentication->switchback();
break;
}
}