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

View File

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