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'])) { 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);
die (); G::header("location: $url");
die();
} }
//Save session variables //Save session variables

View File

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