FIX for sysLogin validations failure, now the user login from syslogin form is working fine

This commit is contained in:
Erik Amaru Ortiz
2014-02-18 23:20:10 -04:00
parent 763e0d520b
commit 1465d310b7
2 changed files with 17 additions and 11 deletions

View File

@@ -24,12 +24,13 @@
*/
if (isset ($_POST['form']['USER_ENV'])) {
session_destroy();
@session_destroy();
session_start();
$_SESSION ['sysLogin'] = $_POST ['form'];
G::header ('location: /sys' . $_POST ['form'] ['USER_ENV'] . '/' . SYS_LANG . '/' . SYS_SKIN .
'/login/sysLoginVerify');
die ();
$_SESSION['sysLogin'] = $_POST['form'];
$data = base64_encode(serialize($_POST));
$url = sprintf('/sys%s/%s/%s/login/sysLoginVerify?d=%s', $_POST['form']['USER_ENV'], SYS_LANG, SYS_SKIN, $data);
G::header("location: $url");
die();
}
//Save session variables

View File

@@ -23,11 +23,16 @@
*
*/
if (! isset ( $_POST )) {
G::header ( 'location: /sys/' . $lang . '/' . SYS_SKIN . '/' . 'login/login' );
if (array_key_exists("d", $_GET)) {
$_POST = unserialize(base64_decode($_GET["d"]));
}
if (isset ( $_SESSION ['sysLogin'] )) {
$_POST ['form'] = $_SESSION ['sysLogin'];
}
require_once ('authentication.php');
if (! isset ($_POST)) {
G::header('location: /sys/' . $lang . '/' . SYS_SKIN . '/' . 'login/login');
}
if (isset($_SESSION['sysLogin'])) {
$_POST['form'] = $_SESSION['sysLogin'];
}
require_once 'authentication.php';