From a9cb851a025fec3cf1cb057284370292517aeb00 Mon Sep 17 00:00:00 2001 From: Julio Cesar Laura Date: Wed, 17 Sep 2014 10:57:33 -0400 Subject: [PATCH] IMPROVEMENT related to change from rbac.USERS to rbac.RBAC_USERS --- gulliver/bin/tasks/templates/usersList.php.tpl | 4 ++-- workflow/engine/methods/dynaforms/fields_Edit.php | 6 +++++- workflow/engine/methods/login/authentication.php | 4 ++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/gulliver/bin/tasks/templates/usersList.php.tpl b/gulliver/bin/tasks/templates/usersList.php.tpl index 09e4881f7..9fd49ff56 100755 --- a/gulliver/bin/tasks/templates/usersList.php.tpl +++ b/gulliver/bin/tasks/templates/usersList.php.tpl @@ -7,7 +7,7 @@ $G_ID_SUB_MENU_SELECTED = 'USERS'; $con = Propel::getConnection('rbac'); - $sql = "SELECT USR_UID, USR_USERNAME, USR_FIRSTNAME, USR_LASTNAME, USR_EMAIL, USR_STATUS FROM USERS"; + $sql = "SELECT USR_UID, USR_USERNAME, USR_FIRSTNAME, USR_LASTNAME, USR_EMAIL, USR_STATUS FROM RBAC_USERS"; $stmt = $con->createStatement(); $rs = $stmt->executeQuery($sql, ResultSet::FETCHMODE_ASSOC); $rs->next(); @@ -24,7 +24,7 @@ $G_ID_SUB_MENU_SELECTED = 'USERS'; G::LoadClass( 'ArrayPeer'); $c = new Criteria ('dbarray'); $c->setDBArrayTable('user'); - + $G_PUBLISH = new Publisher; $G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'users/usersList', $c ); G::RenderPage('publish'); diff --git a/workflow/engine/methods/dynaforms/fields_Edit.php b/workflow/engine/methods/dynaforms/fields_Edit.php index 57a157269..a951a30fc 100755 --- a/workflow/engine/methods/dynaforms/fields_Edit.php +++ b/workflow/engine/methods/dynaforms/fields_Edit.php @@ -175,7 +175,11 @@ if (! (isset( $fields->Fields['XMLNODE_NAME'] ) && ($fields->Fields['XMLNODE_NAM } if ($tableExists) { $con = Propel::getConnection( $Fields['PME_SQLCONNECTION'] ); - $rs = $con->executeQuery( "SHOW COLUMNS FROM USERS" ); + if ($Fields['PME_SQLCONNECTION'] == 'rbac') { + $rs = $con->executeQuery( "SHOW COLUMNS FROM RBAC_USERS" ); + } else { + $rs = $con->executeQuery( "SHOW COLUMNS FROM USERS" ); + } $result = Array (); $i = 0; while ($rs->next()) { diff --git a/workflow/engine/methods/login/authentication.php b/workflow/engine/methods/login/authentication.php index b336b6073..7473ded99 100755 --- a/workflow/engine/methods/login/authentication.php +++ b/workflow/engine/methods/login/authentication.php @@ -102,12 +102,12 @@ try { if (PPP_FAILED_LOGINS > 0) { if ($_SESSION['FAILED_LOGINS'] >= PPP_FAILED_LOGINS) { $oConnection = Propel::getConnection('rbac'); - $oStatement = $oConnection->prepareStatement("SELECT USR_UID FROM USERS WHERE USR_USERNAME = '" . $usr . "'"); + $oStatement = $oConnection->prepareStatement("SELECT USR_UID FROM RBAC_USERS WHERE USR_USERNAME = '" . $usr . "'"); $oDataset = $oStatement->executeQuery(); if ($oDataset->next()) { $sUserUID = $oDataset->getString('USR_UID'); $oConnection = Propel::getConnection('rbac'); - $oStatement = $oConnection->prepareStatement("UPDATE USERS SET USR_STATUS = 0 WHERE USR_UID = '" . $sUserUID . "'"); + $oStatement = $oConnection->prepareStatement("UPDATE RBAC_USERS SET USR_STATUS = 0 WHERE USR_UID = '" . $sUserUID . "'"); $oStatement->executeQuery(); $oConnection = Propel::getConnection('workflow'); $oStatement = $oConnection->prepareStatement("UPDATE USERS SET USR_STATUS = 'INACTIVE' WHERE USR_UID = '" . $sUserUID . "'");