bludit/admin/controllers/login.php

36 lines
1.2 KiB
PHP
Raw Normal View History

2015-03-27 02:00:01 +01:00
<?php defined('BLUDIT') or die('Bludit CMS.');
2015-08-03 02:49:12 +02:00
// ============================================================================
// Check role
// ============================================================================
// ============================================================================
// Functions
// ============================================================================
// ============================================================================
// Main before POST
// ============================================================================
// ============================================================================
// POST Method
// ============================================================================
2015-03-27 02:00:01 +01:00
if( $_SERVER['REQUEST_METHOD'] == 'POST' )
{
$username = Sanitize::html($_POST['username']);
$password = Sanitize::html($_POST['password']);
if( $Login->verifyUser($username, $password) )
{
Redirect::page('admin', 'dashboard');
}
2015-05-15 00:07:45 +02:00
else
{
2015-07-22 05:15:02 +02:00
Alert::set($Language->g('Username or password incorrect'));
2015-05-15 00:07:45 +02:00
}
2015-08-03 02:49:12 +02:00
}
// ============================================================================
// Main after POST
// ============================================================================