@@ -1,7 +1,12 @@
|
|||||||
PM.Sessions = (function () {
|
PM.Sessions = (function () {
|
||||||
var Sessions = function () {
|
var Sessions = function () {
|
||||||
|
if (this.getCookie('singleSignOn') === '1') {
|
||||||
|
this.register();
|
||||||
|
this.eraseCookie('singleSignOn');
|
||||||
|
}
|
||||||
if (window.location.pathname.indexOf("login") === -1 &&
|
if (window.location.pathname.indexOf("login") === -1 &&
|
||||||
window.location.pathname.indexOf("sysLogin") === -1 &&
|
window.location.pathname.indexOf("sysLogin") === -1 &&
|
||||||
|
window.location.pathname.indexOf("authentication") === -1 &&
|
||||||
this.getCookie('PM-TabPrimary') !== '101010010') {
|
this.getCookie('PM-TabPrimary') !== '101010010') {
|
||||||
this.isClose = (this.getLabel('mainWindowClose') === "true");
|
this.isClose = (this.getLabel('mainWindowClose') === "true");
|
||||||
if (this.isClose && parent.parent.parent.window.name === "") {
|
if (this.isClose && parent.parent.parent.window.name === "") {
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ try {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!$RBAC->singleSignOn) {
|
if (!$RBAC->singleSignOn) {
|
||||||
|
setcookie("singleSignOn", '0', time() + (24 * 60 * 60), '/');
|
||||||
if (!isset($_POST['form']) ) {
|
if (!isset($_POST['form']) ) {
|
||||||
G::SendTemporalMessage ('ID_USER_HAVENT_RIGHTS_SYSTEM', 'error');
|
G::SendTemporalMessage ('ID_USER_HAVENT_RIGHTS_SYSTEM', 'error');
|
||||||
G::header('Location: login');
|
G::header('Location: login');
|
||||||
@@ -175,6 +176,7 @@ try {
|
|||||||
$_SESSION['USER_LOGGED'] = $uid;
|
$_SESSION['USER_LOGGED'] = $uid;
|
||||||
$_SESSION['USR_USERNAME'] = $usr;
|
$_SESSION['USR_USERNAME'] = $usr;
|
||||||
} else {
|
} else {
|
||||||
|
setcookie("singleSignOn", '1', time() + (24 * 60 * 60), '/');
|
||||||
$uid = $RBAC->userObj->fields['USR_UID'];
|
$uid = $RBAC->userObj->fields['USR_UID'];
|
||||||
$usr = $RBAC->userObj->fields['USR_USERNAME'];
|
$usr = $RBAC->userObj->fields['USR_USERNAME'];
|
||||||
$_SESSION['USER_LOGGED'] = $uid;
|
$_SESSION['USER_LOGGED'] = $uid;
|
||||||
|
|||||||
Reference in New Issue
Block a user