diff --git a/2016/login.php b/2016/login.php index 9163064..0806d89 100644 --- a/2016/login.php +++ b/2016/login.php @@ -1,75 +1,83 @@ . require 'load.php'; $status = null; -if( isset( $_GET['logout'] ) ) { +if( is_action( 'logout' ) ) { logout(); } -if( isset( $_POST['user_uid'], $_POST['user_password'] ) ) { +if( is_action( 'login' ) && isset( $_POST['user_uid'], $_POST['user_password'] ) ) { login( $status ); } switch( $status ) { case Session::LOGIN_FAILED: error_die("Wrong e-mail or password"); break; case Session::USER_DISABLED: error_die("User disabled"); break; } Header::spawn( null, [ 'title' => __( "Login" ), ] ); if( is_logged() ): ?> -
= __("Sei loggato!") ?>
-= HTML::a( - CURRENT_CONFERENCE_PATH . '/login.php?logout', - __("Sloggati") . icon('exit_to_app', 'left') - ) ?>
+ +