HOR-3926
This commit is contained in:
committed by
davidcallizaya
parent
b221d72311
commit
5327ecdfd5
File diff suppressed because it is too large
Load Diff
@@ -24,6 +24,7 @@
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @access public
|
||||
*/
|
||||
@@ -44,57 +45,60 @@ use ProcessMaker\Plugins\PluginRegistry;
|
||||
class RbacUsers extends BaseRbacUsers
|
||||
{
|
||||
|
||||
private $userUidReserved = [RBAC::GUEST_USER_UID];
|
||||
|
||||
/**
|
||||
* Autentificacion de un usuario a traves de la clase RBAC_user
|
||||
* Authentication of a user through the class RBAC_user
|
||||
*
|
||||
* verifica que un usuario tiene derechos de iniciar una aplicacion
|
||||
* verifies that a user has permission to start an application
|
||||
*
|
||||
* @author Fernando Ontiveros Lira <fernando@colosa.com>
|
||||
* access public
|
||||
* @access public
|
||||
* Function verifyLogin
|
||||
*
|
||||
* @param string $strUser UserId (login) de usuario
|
||||
* @param string $strPass Password
|
||||
* @return
|
||||
* -1: no existe usuario
|
||||
* -2: password errado
|
||||
* -3: usuario inactivo
|
||||
* -4: usuario vencido
|
||||
* -6: role inactivo
|
||||
* n : uid de usuario
|
||||
* @param string $userName UserId (login) de usuario
|
||||
* @param string $password Password
|
||||
* @return type
|
||||
* -1: no user exists
|
||||
* -2: wrong password
|
||||
* -3: inactive user
|
||||
* -4: expired user
|
||||
* -6: role inactive
|
||||
* n : string user uid
|
||||
* @throws Exception
|
||||
*/
|
||||
public function verifyLogin($sUsername, $sPassword)
|
||||
public function verifyLogin($userName, $password)
|
||||
{
|
||||
//invalid user
|
||||
if ($sUsername == '') {
|
||||
if ($userName == '') {
|
||||
return -1;
|
||||
}
|
||||
//invalid password
|
||||
if ($sPassword == '') {
|
||||
if ($password == '') {
|
||||
return -2;
|
||||
}
|
||||
$con = Propel::getConnection(RbacUsersPeer::DATABASE_NAME);
|
||||
try {
|
||||
$c = new Criteria('rbac');
|
||||
$c->add(RbacUsersPeer::USR_USERNAME, $sUsername);
|
||||
$c->add(RbacUsersPeer::USR_USERNAME, $userName);
|
||||
/* @var $rs RbacUsers[] */
|
||||
$rs = RbacUsersPeer::doSelect($c, Propel::getDbConnection('rbac_ro'));
|
||||
if (is_array($rs) && isset($rs[0]) && is_object($rs[0]) && get_class($rs[0]) == 'RbacUsers') {
|
||||
$aFields = $rs[0]->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
$dataFields = $rs[0]->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
//verify password with md5, and md5 format
|
||||
if (mb_strtoupper($sUsername, 'utf-8') === mb_strtoupper($aFields['USR_USERNAME'], 'utf-8')) {
|
||||
if( Bootstrap::verifyHashPassword($sPassword, $rs[0]->getUsrPassword()) ) {
|
||||
if ($aFields['USR_DUE_DATE'] < date('Y-m-d')) {
|
||||
if (mb_strtoupper($userName, 'utf-8') === mb_strtoupper($dataFields['USR_USERNAME'], 'utf-8')) {
|
||||
if (Bootstrap::verifyHashPassword($password, $rs[0]->getUsrPassword())) {
|
||||
if ($dataFields['USR_DUE_DATE'] < date('Y-m-d')) {
|
||||
return -4;
|
||||
}
|
||||
if ($aFields['USR_STATUS'] != 1 && $aFields['USR_UID'] !== RBAC::GUEST_USER_UID) {
|
||||
if ($dataFields['USR_STATUS'] != 1 && $dataFields['USR_UID'] !== RBAC::GUEST_USER_UID) {
|
||||
return -3;
|
||||
}
|
||||
$role = $this->getUserRole($aFields['USR_UID']);
|
||||
$role = $this->getUserRole($dataFields['USR_UID']);
|
||||
if ($role['ROL_STATUS'] == 0) {
|
||||
return -6;
|
||||
}
|
||||
return $aFields['USR_UID'];
|
||||
|
||||
return $dataFields['USR_UID'];
|
||||
} else {
|
||||
return -2;
|
||||
}
|
||||
@@ -104,100 +108,134 @@ class RbacUsers extends BaseRbacUsers
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
} catch (Exception $oError) {
|
||||
throw($oError);
|
||||
} catch (Exception $error) {
|
||||
throw($error);
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
public function verifyUser($sUsername)
|
||||
/**
|
||||
* Verify if the userName exists
|
||||
* @param string $userName
|
||||
* @return integer
|
||||
* @throws Exception
|
||||
*/
|
||||
public function verifyUser($userName)
|
||||
{
|
||||
//invalid user
|
||||
if ($sUsername == '') {
|
||||
if ($userName == '') {
|
||||
return 0;
|
||||
}
|
||||
$con = Propel::getConnection(RbacUsersPeer::DATABASE_NAME);
|
||||
try {
|
||||
$c = new Criteria('rbac');
|
||||
$c->add(RbacUsersPeer::USR_USERNAME, $sUsername);
|
||||
$c->add(RbacUsersPeer::USR_USERNAME, $userName);
|
||||
$rs = RbacUsersPeer::doSelect($c, Propel::getDbConnection('rbac_ro'));
|
||||
if (is_array($rs) && isset($rs[0]) && is_object($rs[0]) && get_class($rs[0]) == 'RbacUsers') {
|
||||
//return the row for futher check of which Autentificacion method belongs this user
|
||||
$this->fields = $rs[0]->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
;
|
||||
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
} catch (Exception $oError) {
|
||||
throw($oError);
|
||||
} catch (Exception $error) {
|
||||
throw($error);
|
||||
}
|
||||
}
|
||||
|
||||
public function getByUsername($sUsername)
|
||||
/**
|
||||
* Get user info by userName
|
||||
* @param string $userName
|
||||
* @return array $dataFields if exist
|
||||
* false if does not exist
|
||||
* @throws Exception
|
||||
*/
|
||||
public function getByUsername($userName)
|
||||
{
|
||||
//invalid user
|
||||
if ($sUsername == '') {
|
||||
if ($userName == '') {
|
||||
return 0;
|
||||
}
|
||||
$con = Propel::getConnection(RbacUsersPeer::DATABASE_NAME);
|
||||
try {
|
||||
$c = new Criteria('rbac');
|
||||
$c->add(RbacUsersPeer::USR_USERNAME, $sUsername);
|
||||
$c->add(RbacUsersPeer::USR_USERNAME, $userName);
|
||||
$rs = RbacUsersPeer::doSelect($c, Propel::getDbConnection('rbac_ro'));
|
||||
|
||||
if (is_array($rs) && isset($rs[0]) && is_object($rs[0]) && get_class($rs[0]) == 'RbacUsers') {
|
||||
$aFields = $rs[0]->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
return $aFields;
|
||||
$dataFields = $rs[0]->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
|
||||
return $dataFields;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
} catch (Exception $oError) {
|
||||
throw($oError);
|
||||
} catch (Exception $error) {
|
||||
throw($error);
|
||||
}
|
||||
}
|
||||
|
||||
public function verifyUserId($sUserId)
|
||||
/**
|
||||
* Verify user by Uid
|
||||
* @param string $userUid
|
||||
* @return integer
|
||||
* @throws Exception
|
||||
*/
|
||||
public function verifyUserId($userUid)
|
||||
{
|
||||
//invalid user
|
||||
if ($sUserId == '') {
|
||||
if ($userUid == '') {
|
||||
return 0;
|
||||
}
|
||||
$con = Propel::getConnection(RbacUsersPeer::DATABASE_NAME);
|
||||
try {
|
||||
$c = new Criteria('rbac');
|
||||
$c->add(RbacUsersPeer::USR_UID, $sUserId);
|
||||
$c->add(RbacUsersPeer::USR_UID, $userUid);
|
||||
$rs = RbacUsersPeer::doSelect($c, Propel::getDbConnection('rbac_ro'));
|
||||
if (is_array($rs) && isset($rs[0]) && is_object($rs[0]) && get_class($rs[0]) == 'RbacUsers') {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
} catch (Exception $oError) {
|
||||
throw($oError);
|
||||
} catch (Exception $error) {
|
||||
throw($error);
|
||||
}
|
||||
}
|
||||
|
||||
public function load($sUsrUid)
|
||||
/**
|
||||
* Load user information by Uid
|
||||
* @param string $userUid
|
||||
* @return array $dataFields
|
||||
* @throws Exception
|
||||
*/
|
||||
public function load($userUid)
|
||||
{
|
||||
$con = Propel::getConnection(RbacUsersPeer::DATABASE_NAME);
|
||||
try {
|
||||
$c = new Criteria('rbac');
|
||||
$c->add(RbacUsersPeer::USR_UID, $sUsrUid);
|
||||
$c->add(RbacUsersPeer::USR_UID, $userUid);
|
||||
$resultSet = RbacUsersPeer::doSelectRS($c, Propel::getDbConnection('rbac_ro'));
|
||||
if ($resultSet->next()) {
|
||||
$this->hydrate($resultSet);
|
||||
$aFields = $this->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
return $aFields;
|
||||
$dataFields = $this->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
|
||||
return $dataFields;
|
||||
}
|
||||
|
||||
return false;
|
||||
} catch (Exception $oError) {
|
||||
throw($oError);
|
||||
} catch (Exception $error) {
|
||||
throw($error);
|
||||
}
|
||||
return $res;
|
||||
}
|
||||
|
||||
public function create($aData)
|
||||
/**
|
||||
* Create an user
|
||||
* @param string $infoData
|
||||
* @return array
|
||||
* @throws Exception
|
||||
*/
|
||||
public function create($infoData)
|
||||
{
|
||||
if (class_exists('ProcessMaker\Plugins\PluginRegistry')) {
|
||||
$pluginRegistry = PluginRegistry::loadSingleton();
|
||||
@@ -209,116 +247,134 @@ class RbacUsers extends BaseRbacUsers
|
||||
}
|
||||
}
|
||||
}
|
||||
$oConnection = Propel::getConnection(RbacUsersPeer::DATABASE_NAME);
|
||||
$connection = Propel::getConnection(RbacUsersPeer::DATABASE_NAME);
|
||||
try {
|
||||
$oRBACUsers = new RbacUsers();
|
||||
$rbacUsers = new RbacUsers();
|
||||
do {
|
||||
$aData['USR_UID'] = G::generateUniqueID();
|
||||
} while ($oRBACUsers->load($aData['USR_UID']));
|
||||
$oRBACUsers->fromArray($aData, BasePeer::TYPE_FIELDNAME);
|
||||
//if ($oRBACUsers->validate()) {
|
||||
//$oConnection->begin();
|
||||
$iResult = $oRBACUsers->save();
|
||||
//$oConnection->commit();
|
||||
return $aData['USR_UID'];
|
||||
/* }
|
||||
else {
|
||||
$sMessage = '';
|
||||
$aValidationFailures = $oRBACUsers->getValidationFailures();
|
||||
foreach($aValidationFailures as $oValidationFailure) {
|
||||
$sMessage .= $oValidationFailure->getMessage() . '<br />';
|
||||
}
|
||||
throw(new Exception('The registry cannot be created!<br />' . $sMessage));
|
||||
} */
|
||||
} catch (Exception $oError) {
|
||||
$oConnection->rollback();
|
||||
throw($oError);
|
||||
$infoData['USR_UID'] = G::generateUniqueID();
|
||||
} while ($rbacUsers->load($infoData['USR_UID']));
|
||||
$rbacUsers->fromArray($infoData, BasePeer::TYPE_FIELDNAME);
|
||||
$result = $rbacUsers->save();
|
||||
|
||||
return $infoData['USR_UID'];
|
||||
} catch (Exception $error) {
|
||||
$connection->rollback();
|
||||
throw($error);
|
||||
}
|
||||
}
|
||||
|
||||
public function update($aData)
|
||||
/**
|
||||
* Update an user
|
||||
* @param string $infoData
|
||||
* @return boolean
|
||||
* @throws Exception
|
||||
*/
|
||||
public function update($infoData)
|
||||
{
|
||||
if (in_array($infoData['USR_UID'], $this->userUidReserved)) {
|
||||
throw new Exception(G::LoadTranslation("ID_USER_CAN_NOT_UPDATE", array($infoData['USR_UID'])));
|
||||
return false;
|
||||
}
|
||||
$oConnection = Propel::getConnection(RbacUsersPeer::DATABASE_NAME);
|
||||
try {
|
||||
$this->fromArray($aData, BasePeer::TYPE_FIELDNAME);
|
||||
$this->fromArray($infoData, BasePeer::TYPE_FIELDNAME);
|
||||
$this->setNew(false);
|
||||
$iResult = $this->save();
|
||||
} catch (Exception $oError) {
|
||||
$result = $this->save();
|
||||
} catch (Exception $error) {
|
||||
$oConnection->rollback();
|
||||
throw($oError);
|
||||
throw($error);
|
||||
}
|
||||
}
|
||||
|
||||
public function remove($sUserUID = '')
|
||||
/**
|
||||
* Remove an user
|
||||
* @param string $userUid
|
||||
* @return void
|
||||
*/
|
||||
public function remove($userUid = '')
|
||||
{
|
||||
$this->setUsrUid($sUserUID);
|
||||
$this->setUsrUid($userUid);
|
||||
$this->delete();
|
||||
}
|
||||
|
||||
//Added by Qennix at Feb 14th, 2011
|
||||
//Gets an associative array with total users by authentication sources
|
||||
/**
|
||||
* Gets an associative array with total users by authentication sources
|
||||
* @return array $listAuth
|
||||
*/
|
||||
public function getAllUsersByAuthSource()
|
||||
{
|
||||
$oCriteria = new Criteria('rbac');
|
||||
$oCriteria->addSelectColumn(RbacUsersPeer::UID_AUTH_SOURCE);
|
||||
$oCriteria->addSelectColumn('COUNT(*) AS CNT');
|
||||
$oCriteria->add(RbacUsersPeer::USR_STATUS, 'CLOSED', Criteria::NOT_EQUAL);
|
||||
$oCriteria->addGroupByColumn(RbacUsersPeer::UID_AUTH_SOURCE);
|
||||
$oDataset = RbacUsersPeer::doSelectRS($oCriteria, Propel::getDbConnection('rbac_ro'));
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$criteria = new Criteria('rbac');
|
||||
$criteria->addSelectColumn(RbacUsersPeer::UID_AUTH_SOURCE);
|
||||
$criteria->addSelectColumn('COUNT(*) AS CNT');
|
||||
$criteria->add(RbacUsersPeer::USR_STATUS, 'CLOSED', Criteria::NOT_EQUAL);
|
||||
$criteria->addGroupByColumn(RbacUsersPeer::UID_AUTH_SOURCE);
|
||||
$dataset = RbacUsersPeer::doSelectRS($criteria, Propel::getDbConnection('rbac_ro'));
|
||||
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
|
||||
$aAuth = Array();
|
||||
while ($oDataset->next()) {
|
||||
$row = $oDataset->getRow();
|
||||
$aAuth[$row['UID_AUTH_SOURCE']] = $row['CNT'];
|
||||
$listAuth = [];
|
||||
while ($dataset->next()) {
|
||||
$row = $dataset->getRow();
|
||||
$listAuth[$row['UID_AUTH_SOURCE']] = $row['CNT'];
|
||||
}
|
||||
return $aAuth;
|
||||
|
||||
return $listAuth;
|
||||
}
|
||||
|
||||
//Returns all users with auth_source
|
||||
public function getListUsersByAuthSource($auth_source)
|
||||
/**
|
||||
* Get users list related to an authentication source
|
||||
* @param string $authSource
|
||||
* @return array $listUsers, all users with auth_source
|
||||
*/
|
||||
public function getListUsersByAuthSource($authSource)
|
||||
{
|
||||
$oCriteria = new Criteria('rbac');
|
||||
$oCriteria->addSelectColumn(RbacUsersPeer::USR_UID);
|
||||
$criteria = new Criteria('rbac');
|
||||
$criteria->addSelectColumn(RbacUsersPeer::USR_UID);
|
||||
|
||||
if ($auth_source == '00000000000000000000000000000000') {
|
||||
$oCriteria->add(
|
||||
$oCriteria->getNewCriterion(RbacUsersPeer::UID_AUTH_SOURCE, $auth_source, Criteria::EQUAL)->addOr(
|
||||
$oCriteria->getNewCriterion(RbacUsersPeer::UID_AUTH_SOURCE, '', Criteria::EQUAL)
|
||||
));
|
||||
if ($authSource == '00000000000000000000000000000000') {
|
||||
$criteria->add(
|
||||
$criteria->getNewCriterion(RbacUsersPeer::UID_AUTH_SOURCE, $authSource, Criteria::EQUAL)->addOr(
|
||||
$criteria->getNewCriterion(RbacUsersPeer::UID_AUTH_SOURCE, '', Criteria::EQUAL)
|
||||
));
|
||||
} else {
|
||||
$oCriteria->add(RbacUsersPeer::UID_AUTH_SOURCE, $auth_source, Criteria::EQUAL);
|
||||
$criteria->add(RbacUsersPeer::UID_AUTH_SOURCE, $authSource, Criteria::EQUAL);
|
||||
}
|
||||
$oCriteria->add(RbacUsersPeer::USR_STATUS, 0, Criteria::NOT_EQUAL);
|
||||
$oDataset = RbacUsersPeer::doSelectRS($oCriteria, Propel::getDbConnection('rbac_ro'));
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$aUsers = array();
|
||||
while ($oDataset->next()) {
|
||||
$row = $oDataset->getRow();
|
||||
$aUsers[] = $row['USR_UID'];
|
||||
$criteria->add(RbacUsersPeer::USR_STATUS, 0, Criteria::NOT_EQUAL);
|
||||
$dataset = RbacUsersPeer::doSelectRS($criteria, Propel::getDbConnection('rbac_ro'));
|
||||
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$listUsers = [];
|
||||
while ($dataset->next()) {
|
||||
$row = $dataset->getRow();
|
||||
$listUsers[] = $row['USR_UID'];
|
||||
}
|
||||
return $aUsers;
|
||||
|
||||
return $listUsers;
|
||||
}
|
||||
|
||||
public function getUserRole($UsrUid)
|
||||
/**
|
||||
* Get the user's role
|
||||
* @param string $userUid
|
||||
* @return array $row
|
||||
* @throws Exception
|
||||
*/
|
||||
public function getUserRole($userUid)
|
||||
{
|
||||
$con = Propel::getConnection(UsersRolesPeer::DATABASE_NAME);
|
||||
try {
|
||||
$c = new Criteria( 'rbac' );
|
||||
$c = new Criteria('rbac');
|
||||
$c->clearSelectColumns();
|
||||
$c->addSelectColumn ( RolesPeer::ROL_UID );
|
||||
$c->addSelectColumn ( RolesPeer::ROL_CODE );
|
||||
$c->addSelectColumn ( RolesPeer::ROL_STATUS );
|
||||
$c->addJoin ( UsersRolesPeer::ROL_UID, RolesPeer::ROL_UID );
|
||||
$c->add ( UsersRolesPeer::USR_UID, $UsrUid );
|
||||
$rs = UsersRolesPeer::doSelectRs( $c , Propel::getDbConnection('rbac_ro'));
|
||||
$rs->setFetchmode (ResultSet::FETCHMODE_ASSOC);
|
||||
$c->addSelectColumn(RolesPeer::ROL_UID);
|
||||
$c->addSelectColumn(RolesPeer::ROL_CODE);
|
||||
$c->addSelectColumn(RolesPeer::ROL_STATUS);
|
||||
$c->addJoin(UsersRolesPeer::ROL_UID, RolesPeer::ROL_UID);
|
||||
$c->add(UsersRolesPeer::USR_UID, $userUid);
|
||||
$rs = UsersRolesPeer::doSelectRs($c, Propel::getDbConnection('rbac_ro'));
|
||||
$rs->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$rs->next();
|
||||
$row = $rs->getRow();
|
||||
|
||||
return $row;
|
||||
}
|
||||
catch (Exception $oError) {
|
||||
throw($oError);
|
||||
} catch (Exception $error) {
|
||||
throw($error);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -342,6 +398,7 @@ class RbacUsers extends BaseRbacUsers
|
||||
);
|
||||
$array = parent::toArray($keyType);
|
||||
unset($array[$key]);
|
||||
|
||||
return $array;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,28 +77,38 @@ class Groups
|
||||
/**
|
||||
* Set a user to group
|
||||
*
|
||||
* @param string $GrpUid, $UsrUid
|
||||
* @return array
|
||||
* @param string $grpUid
|
||||
* @param string $usrUid
|
||||
* @return boolean
|
||||
* @throws exception
|
||||
*/
|
||||
public function addUserToGroup($GrpUid, $UsrUid)
|
||||
public function addUserToGroup($grpUid, $usrUid)
|
||||
{
|
||||
try {
|
||||
$oGrp = GroupUserPeer::retrieveByPk($GrpUid, $UsrUid);
|
||||
if (is_object($oGrp) && get_class($oGrp) == 'GroupUser') {
|
||||
//Check the usrUid value
|
||||
if (RBAC::isGuestUserUid($usrUid)) {
|
||||
throw new Exception(G::LoadTranslation("ID_USER_CAN_NOT_UPDATE", array($usrUid)));
|
||||
return false;
|
||||
}
|
||||
|
||||
$groupUser = GroupUserPeer::retrieveByPk($grpUid, $usrUid);
|
||||
if (is_object($groupUser) && get_class($groupUser) == 'GroupUser') {
|
||||
return true;
|
||||
} else {
|
||||
$oGrp = new GroupUser();
|
||||
$oGrp->setGrpUid($GrpUid);
|
||||
$oGrp->setUsrUid($UsrUid);
|
||||
$oGrp->Save();
|
||||
$groupUser = new GroupUser();
|
||||
$groupUser->setGrpUid($grpUid);
|
||||
$groupUser->setUsrUid($usrUid);
|
||||
$groupUser->Save();
|
||||
|
||||
$oGrpwf = new Groupwf();
|
||||
$grpName = $oGrpwf->loadByGroupUid($GrpUid);
|
||||
$groupWf = new Groupwf();
|
||||
$grpName = $groupWf->loadByGroupUid($grpUid);
|
||||
|
||||
$oUsr = new Users();
|
||||
$usrName = $oUsr->load($UsrUid);
|
||||
$users = new Users();
|
||||
$usrName = $users->load($usrUid);
|
||||
|
||||
G::auditLog("AssignUserToGroup", "Assign user ". $usrName['USR_USERNAME'] ." (".$UsrUid.") to group ".$grpName['CON_VALUE']." (".$GrpUid.") ");
|
||||
G::auditLog("AssignUserToGroup", "Assign user ". $usrName['USR_USERNAME'] ." (".$usrUid.") to group ".$grpName['CON_VALUE']." (".$grpUid.") ");
|
||||
|
||||
return true;
|
||||
}
|
||||
} catch (exception $oError) {
|
||||
throw ($oError);
|
||||
@@ -107,13 +117,14 @@ class Groups
|
||||
|
||||
/**
|
||||
* Remove a user from group
|
||||
* @param string $GrpUid, $UsrUid
|
||||
* @param string $grpUid
|
||||
* @param string $usrUid
|
||||
* @return array
|
||||
*/
|
||||
public function removeUserOfGroup($GrpUid, $UsrUid)
|
||||
public function removeUserOfGroup($grpUid, $usrUid)
|
||||
{
|
||||
$gu = new GroupUser();
|
||||
$gu->remove($GrpUid, $UsrUid);
|
||||
$gu->remove($grpUid, $usrUid);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -109,7 +109,7 @@ class WsBase
|
||||
public function processList()
|
||||
{
|
||||
try {
|
||||
$result = array();
|
||||
$result = [];
|
||||
$oCriteria = new Criteria('workflow');
|
||||
$oCriteria->add(ProcessPeer::PRO_STATUS, 'DISABLED', Criteria::NOT_EQUAL);
|
||||
$oDataset = ProcessPeer::doSelectRS($oCriteria);
|
||||
@@ -142,7 +142,7 @@ class WsBase
|
||||
public function roleList()
|
||||
{
|
||||
try {
|
||||
$result = array();
|
||||
$result = [];
|
||||
|
||||
$RBAC = & RBAC::getSingleton();
|
||||
$RBAC->initRBAC();
|
||||
@@ -195,7 +195,7 @@ class WsBase
|
||||
}
|
||||
$rs = GroupwfPeer::doSelectRS($criteria);
|
||||
$rs->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$result = array();
|
||||
$result = [];
|
||||
while ($rs->next()) {
|
||||
$rows = $rs->getRow();
|
||||
$result[] = array('guid' => $rows['GRP_UID'], 'name' => $rows['GRP_TITLE']);
|
||||
@@ -216,7 +216,7 @@ class WsBase
|
||||
public function departmentList()
|
||||
{
|
||||
try {
|
||||
$result = array();
|
||||
$result = [];
|
||||
$oCriteria = new Criteria('workflow');
|
||||
$oCriteria->add(DepartmentPeer::DEP_STATUS, 'ACTIVE');
|
||||
$oDataset = DepartmentPeer::doSelectRS($oCriteria);
|
||||
@@ -283,9 +283,9 @@ class WsBase
|
||||
|
||||
if ($solrEnabled == 1) {
|
||||
try {
|
||||
$arrayData = array();
|
||||
$arrayData = [];
|
||||
|
||||
$delegationIndexes = array();
|
||||
$delegationIndexes = [];
|
||||
$columsToInclude = array("APP_UID");
|
||||
$solrSearchText = null;
|
||||
|
||||
@@ -323,7 +323,7 @@ class WsBase
|
||||
$solrQueryResult = $searchIndex->getDataTablePaginatedList($solrRequestData);
|
||||
|
||||
//Get the missing data from database
|
||||
$arrayApplicationUid = array();
|
||||
$arrayApplicationUid = [];
|
||||
|
||||
foreach ($solrQueryResult->aaData as $i => $data) {
|
||||
$arrayApplicationUid[] = $data["APP_UID"];
|
||||
@@ -333,7 +333,7 @@ class WsBase
|
||||
|
||||
foreach ($solrQueryResult->aaData as $i => $data) {
|
||||
//Initialize array
|
||||
$delIndexes = array(); //Store all the delegation indexes
|
||||
$delIndexes = []; //Store all the delegation indexes
|
||||
//Complete empty values
|
||||
$applicationUid = $data["APP_UID"]; //APP_UID
|
||||
//Get all the indexes returned by Solr as columns
|
||||
@@ -357,7 +357,7 @@ class WsBase
|
||||
|
||||
//Get records
|
||||
foreach ($delIndexes as $delIndex) {
|
||||
$aRow = array();
|
||||
$aRow = [];
|
||||
|
||||
//Copy result values to new row from Solr server
|
||||
$aRow["APP_UID"] = $data["APP_UID"];
|
||||
@@ -394,7 +394,7 @@ class WsBase
|
||||
|
||||
return $arrayData;
|
||||
} catch (InvalidIndexSearchTextException $e) {
|
||||
$arrayData = array();
|
||||
$arrayData = [];
|
||||
|
||||
$arrayData[] = array(
|
||||
"guid" => $e->getMessage(),
|
||||
@@ -407,7 +407,7 @@ class WsBase
|
||||
return $arrayData;
|
||||
}
|
||||
} else {
|
||||
$arrayData = array();
|
||||
$arrayData = [];
|
||||
|
||||
$criteria = new Criteria("workflow");
|
||||
|
||||
@@ -452,7 +452,7 @@ class WsBase
|
||||
return $arrayData;
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
$arrayData = array();
|
||||
$arrayData = [];
|
||||
|
||||
$arrayData[] = array(
|
||||
"guid" => $e->getMessage(),
|
||||
@@ -475,7 +475,7 @@ class WsBase
|
||||
public function unassignedCaseList($userId)
|
||||
{
|
||||
try {
|
||||
$result = array();
|
||||
$result = [];
|
||||
$oAppCache = new AppCacheView();
|
||||
$Criteria = $oAppCache->getUnassignedListCriteria($userId);
|
||||
$oDataset = AppCacheViewPeer::doSelectRS($Criteria);
|
||||
@@ -504,30 +504,34 @@ class WsBase
|
||||
}
|
||||
|
||||
/**
|
||||
* get all groups
|
||||
* Get all users
|
||||
*
|
||||
* @param none
|
||||
* @return $result will return an object
|
||||
* @return array $result, will return an array
|
||||
* @throws Exception
|
||||
*/
|
||||
public function userList()
|
||||
{
|
||||
try {
|
||||
$result = array();
|
||||
$oCriteria = new Criteria('workflow');
|
||||
$oCriteria->add(UsersPeer::USR_STATUS, 'ACTIVE');
|
||||
$oDataset = UsersPeer::doSelectRS($oCriteria);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$oDataset->next();
|
||||
$result = [];
|
||||
$criteria = new Criteria('workflow');
|
||||
$criteria->add(UsersPeer::USR_STATUS, 'ACTIVE');
|
||||
$criteria->add(UsersPeer::USR_UID, [RBAC::GUEST_USER_UID], Criteria::NOT_IN);
|
||||
$dataset = UsersPeer::doSelectRS($criteria);
|
||||
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$dataset->next();
|
||||
|
||||
while ($aRow = $oDataset->getRow()) {
|
||||
$result[] = array('guid' => $aRow['USR_UID'], 'name' => $aRow['USR_USERNAME']);
|
||||
$oDataset->next();
|
||||
while ($row = $dataset->getRow()) {
|
||||
$result[] = ['guid' => $row['USR_UID'], 'name' => $row['USR_USERNAME']];
|
||||
$dataset->next();
|
||||
}
|
||||
|
||||
return $result;
|
||||
} catch (Exception $e) {
|
||||
$result[] = array('guid' => $e->getMessage(), 'name' => $e->getMessage()
|
||||
);
|
||||
$result[] = [
|
||||
'guid' => $e->getMessage(),
|
||||
'name' => $e->getMessage()
|
||||
];
|
||||
|
||||
return $result;
|
||||
}
|
||||
@@ -542,7 +546,7 @@ class WsBase
|
||||
public function triggerList()
|
||||
{
|
||||
try {
|
||||
$result = array();
|
||||
$result = [];
|
||||
$oCriteria = new Criteria('workflow');
|
||||
$oCriteria->addSelectColumn(TriggersPeer::TRI_UID);
|
||||
$oCriteria->addSelectColumn(TriggersPeer::PRO_UID);
|
||||
@@ -583,12 +587,12 @@ class WsBase
|
||||
$sTaskUID = '';
|
||||
$oCriteria = $oCase->getAllUploadedDocumentsCriteria($sProcessUID, $sApplicationUID, $sTaskUID, $sUserUID);
|
||||
|
||||
$result = array();
|
||||
$result = [];
|
||||
global $_DBArray;
|
||||
|
||||
foreach ($_DBArray['inputDocuments'] as $key => $row) {
|
||||
if (isset($row['DOC_VERSION'])) {
|
||||
$docrow = array();
|
||||
$docrow = [];
|
||||
$docrow['guid'] = $row['APP_DOC_UID'];
|
||||
$docrow['filename'] = $row['APP_DOC_FILENAME'];
|
||||
$docrow['docId'] = $row['DOC_UID'];
|
||||
@@ -630,7 +634,7 @@ class WsBase
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$oDataset->next();
|
||||
|
||||
$result = array();
|
||||
$result = [];
|
||||
|
||||
while ($aRow = $oDataset->getRow()) {
|
||||
if ($aRow['INP_DOC_TITLE'] == null) {
|
||||
@@ -641,7 +645,7 @@ class WsBase
|
||||
$aRow['INP_DOC_DESCRIPTION'] = $inputDocumentObj['INP_DOC_DESCRIPTION'];
|
||||
}
|
||||
|
||||
$docrow = array();
|
||||
$docrow = [];
|
||||
$docrow['guid'] = $aRow['INP_DOC_UID'];
|
||||
$docrow['name'] = $aRow['INP_DOC_TITLE'];
|
||||
$docrow['description'] = $aRow['INP_DOC_DESCRIPTION'];
|
||||
@@ -674,12 +678,12 @@ class WsBase
|
||||
$sTaskUID = '';
|
||||
$oCriteria = $oCase->getAllGeneratedDocumentsCriteria($sProcessUID, $sApplicationUID, $sTaskUID, $sUserUID);
|
||||
|
||||
$result = array();
|
||||
$result = [];
|
||||
global $_DBArray;
|
||||
|
||||
foreach ($_DBArray['outputDocuments'] as $key => $row) {
|
||||
if (isset($row['DOC_VERSION'])) {
|
||||
$docrow = array();
|
||||
$docrow = [];
|
||||
$docrow['guid'] = $row['APP_DOC_UID'];
|
||||
$docrow['filename'] = $row['DOWNLOAD_FILE'];
|
||||
|
||||
@@ -736,7 +740,7 @@ class WsBase
|
||||
$oGroup = new Groups();
|
||||
$aGroups = $oGroup->getActiveGroupsForAnUser($userId);
|
||||
|
||||
$result = array();
|
||||
$result = [];
|
||||
$oCriteria = new Criteria('workflow');
|
||||
$del = DBAdapter::getStringDelimiter();
|
||||
$oCriteria->addSelectColumn(TaskPeer::PRO_UID);
|
||||
@@ -787,13 +791,13 @@ class WsBase
|
||||
* @return $result will return an object
|
||||
*/
|
||||
public function sendMessage(
|
||||
$caseId, $sFrom, $sTo, $sCc, $sBcc, $sSubject, $sTemplate, $appFields = null, $aAttachment = null, $showMessage = true, $delIndex = 0, $config = array(), $gmail = 0
|
||||
$caseId, $sFrom, $sTo, $sCc, $sBcc, $sSubject, $sTemplate, $appFields = null, $aAttachment = null, $showMessage = true, $delIndex = 0, $config = [], $gmail = 0
|
||||
) {
|
||||
try {
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if (!empty($config)) {
|
||||
$arrayConfigAux = array();
|
||||
$arrayConfigAux = [];
|
||||
|
||||
if (is_array($config)) {
|
||||
if (PMLicensedFeatures::getSingleton()->verifyfeature("nKaNTNuT1MzK0RsMEtXTnYzR09ucHF2WGNuS0hRdDBBak42WXJhNVVOOG1INEVoaU1EaTllbjBBeEJNeG9wRVJ6NmxQelhyVTBvdThzPQ==")) {
|
||||
@@ -962,7 +966,7 @@ class WsBase
|
||||
|
||||
$oDataset = AppDelayPeer::doSelectRS($oCriteria);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$aIndexsPaused = array();
|
||||
$aIndexsPaused = [];
|
||||
while ($oDataset->next()) {
|
||||
$data = $oDataset->getRow();
|
||||
$aIndexsPaused[] = $data['APP_DEL_INDEX'];
|
||||
@@ -993,7 +997,7 @@ class WsBase
|
||||
$oDataset = AppDelegationPeer::doSelectRS($oCriteria);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
|
||||
$aCurrentUsers = array();
|
||||
$aCurrentUsers = [];
|
||||
|
||||
while ($oDataset->next()) {
|
||||
$aAppDel = $oDataset->getRow();
|
||||
@@ -1114,7 +1118,7 @@ class WsBase
|
||||
$strRole = $role;
|
||||
|
||||
if ($RBAC->verifyByCode($role) == 0) {
|
||||
$data = array();
|
||||
$data = [];
|
||||
$data["ROLE"] = $role;
|
||||
|
||||
$result = new WsCreateUserResponse(6, G::loadTranslation("ID_INVALID_ROLE", SYS_LANG, $data), null);
|
||||
@@ -1130,7 +1134,7 @@ class WsBase
|
||||
}
|
||||
|
||||
if ($RBAC->verifyUser($userName) == 1) {
|
||||
$data = array();
|
||||
$data = [];
|
||||
$data["USER_ID"] = $userName;
|
||||
|
||||
$result = new WsCreateUserResponse(7, G::loadTranslation("ID_USERNAME_ALREADY_EXISTS", SYS_LANG, $data), null);
|
||||
@@ -1139,7 +1143,7 @@ class WsBase
|
||||
}
|
||||
|
||||
//Set fields
|
||||
$arrayData = array();
|
||||
$arrayData = [];
|
||||
|
||||
$arrayData["USR_USERNAME"] = $userName;
|
||||
$arrayData["USR_PASSWORD"] = Bootstrap::hashPassword($password);
|
||||
@@ -1175,7 +1179,7 @@ class WsBase
|
||||
$user->create($arrayData);
|
||||
|
||||
//Response
|
||||
$data = array();
|
||||
$data = [];
|
||||
$data["FIRSTNAME"] = $firstName;
|
||||
$data["LASTNAME"] = $lastName;
|
||||
$data["USER_ID"] = $userName;
|
||||
@@ -1265,7 +1269,7 @@ class WsBase
|
||||
$strRole = $role;
|
||||
|
||||
if ($RBAC->verifyByCode($role) == 0) {
|
||||
$data = array();
|
||||
$data = [];
|
||||
$data["ROLE"] = $role;
|
||||
|
||||
$result = new WsResponse(6, G::LoadTranslation("ID_INVALID_ROLE", SYS_LANG, $data));
|
||||
@@ -1288,7 +1292,7 @@ class WsBase
|
||||
$rs = UsersPeer::doSelectRS($criteria);
|
||||
|
||||
if ($rs->next()) {
|
||||
$data = array();
|
||||
$data = [];
|
||||
$data["USER_ID"] = $userName;
|
||||
|
||||
$result = new WsResponse(7, G::LoadTranslation("ID_USERNAME_ALREADY_EXISTS", SYS_LANG, $data));
|
||||
@@ -1297,7 +1301,7 @@ class WsBase
|
||||
}
|
||||
|
||||
//Set fields
|
||||
$arrayData = array();
|
||||
$arrayData = [];
|
||||
|
||||
$arrayData["USR_UID"] = $userUid;
|
||||
$arrayData["USR_USERNAME"] = $userName;
|
||||
@@ -1695,7 +1699,7 @@ class WsBase
|
||||
|
||||
$caseFields = $oCase->loadCase($caseId);
|
||||
$oldFields = $caseFields['APP_DATA'];
|
||||
$resFields = array();
|
||||
$resFields = [];
|
||||
|
||||
foreach ($variables as $key => $val) {
|
||||
$a .= $val->name . ', ';
|
||||
@@ -1763,7 +1767,7 @@ class WsBase
|
||||
$caseFields = $oCase->loadCase($caseId);
|
||||
|
||||
$oldFields = $caseFields['APP_DATA'];
|
||||
$resFields = array();
|
||||
$resFields = [];
|
||||
|
||||
foreach ($oldFields as $key => $val) {
|
||||
$node = new stdClass();
|
||||
@@ -1805,7 +1809,7 @@ class WsBase
|
||||
$_SESSION["TASK"] = $taskId;
|
||||
$_SESSION["USER_LOGGED"] = $userId;
|
||||
|
||||
$Fields = array();
|
||||
$Fields = [];
|
||||
|
||||
if (is_array($variables) && count($variables) > 0) {
|
||||
$Fields = $variables;
|
||||
@@ -2105,7 +2109,7 @@ class WsBase
|
||||
* @param bool $bExecuteTriggersBeforeAssignment
|
||||
* @return $result will return an object
|
||||
*/
|
||||
public function derivateCase($userId, $caseId, $delIndex, $bExecuteTriggersBeforeAssignment = false, $tasks = array())
|
||||
public function derivateCase($userId, $caseId, $delIndex, $bExecuteTriggersBeforeAssignment = false, $tasks = [])
|
||||
{
|
||||
$g = new G();
|
||||
|
||||
@@ -2119,7 +2123,7 @@ class WsBase
|
||||
//Define variables
|
||||
$sStatus = 'TO_DO';
|
||||
$varResponse = '';
|
||||
$previousAppData = array();
|
||||
$previousAppData = [];
|
||||
|
||||
if ($delIndex == '') {
|
||||
$oCriteria = new Criteria('workflow');
|
||||
@@ -2165,7 +2169,7 @@ class WsBase
|
||||
}
|
||||
}
|
||||
|
||||
$aData = array();
|
||||
$aData = [];
|
||||
$aData['APP_UID'] = $caseId;
|
||||
$aData['DEL_INDEX'] = $delIndex;
|
||||
$aData['USER_UID'] = $userId;
|
||||
@@ -2221,7 +2225,7 @@ class WsBase
|
||||
|
||||
foreach ($derive as $key => $val) {
|
||||
//Routed to the next task, if end process then not exist user
|
||||
$nodeNext = array();
|
||||
$nodeNext = [];
|
||||
$usrasgdUid = null;
|
||||
$usrasgdUserName = null;
|
||||
|
||||
@@ -2332,7 +2336,7 @@ class WsBase
|
||||
$oDataset = AppDelegationPeer::doSelectRS($oCriteria);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
|
||||
$aCurrentUsers = array();
|
||||
$aCurrentUsers = [];
|
||||
|
||||
while ($oDataset->next()) {
|
||||
$aAppDel = $oDataset->getRow();
|
||||
@@ -2469,7 +2473,7 @@ class WsBase
|
||||
}
|
||||
|
||||
//executeTrigger
|
||||
$aTriggers = array();
|
||||
$aTriggers = [];
|
||||
$c = new Criteria();
|
||||
$c->add(TriggersPeer::TRI_UID, $triggerIndex);
|
||||
$rs = TriggersPeer::doSelectRS($c);
|
||||
@@ -2531,7 +2535,7 @@ class WsBase
|
||||
*/
|
||||
public function taskCase($caseId)
|
||||
{
|
||||
$result = array();
|
||||
$result = [];
|
||||
try {
|
||||
$oCriteria = new Criteria('workflow');
|
||||
$oCriteria->addSelectColumn(AppDelegationPeer::DEL_INDEX);
|
||||
@@ -2574,7 +2578,7 @@ class WsBase
|
||||
try {
|
||||
$oCase = new Cases();
|
||||
$rows = $oCase->getStartCases($userId);
|
||||
$result = array();
|
||||
$result = [];
|
||||
|
||||
foreach ($rows as $key => $val) {
|
||||
if ($key != 0) {
|
||||
@@ -2659,7 +2663,7 @@ class WsBase
|
||||
* ****************( 3 )*****************
|
||||
*/
|
||||
$oCriteria = new Criteria('workflow');
|
||||
$aConditions = array();
|
||||
$aConditions = [];
|
||||
$oCriteria->add(AppDelegationPeer::APP_UID, $caseId);
|
||||
$oCriteria->add(AppDelegationPeer::USR_UID, $userIdSource);
|
||||
$oCriteria->add(AppDelegationPeer::DEL_INDEX, $delIndex);
|
||||
@@ -2790,10 +2794,10 @@ class WsBase
|
||||
try {
|
||||
$result = new wsGetCaseNotesResponse(0, G::loadTranslation('ID_SUCCESS'), Cases::getCaseNotes($applicationID, 'array', $userUid));
|
||||
|
||||
$var = array();
|
||||
$var = [];
|
||||
|
||||
foreach ($result->notes as $key => $value) {
|
||||
$var2 = array();
|
||||
$var2 = [];
|
||||
|
||||
foreach ($value as $keys => $values) {
|
||||
$field = strtolower($keys);
|
||||
|
||||
@@ -43,38 +43,52 @@ class TaskUser extends BaseTaskUser
|
||||
{
|
||||
|
||||
/**
|
||||
* Create the application document registry
|
||||
* Create the new record in the table TaskUser
|
||||
*
|
||||
* @param array $aData
|
||||
* @param array $requestData
|
||||
* @return string
|
||||
* @throws Exception
|
||||
*
|
||||
*/
|
||||
public function create ($aData)
|
||||
public function create ($requestData)
|
||||
{
|
||||
$oConnection = Propel::getConnection( TaskUserPeer::DATABASE_NAME );
|
||||
$connection = Propel::getConnection(TaskUserPeer::DATABASE_NAME);
|
||||
try {
|
||||
$taskUser = TaskUserPeer::retrieveByPK( $aData['TAS_UID'], $aData['USR_UID'], $aData['TU_TYPE'], $aData['TU_RELATION'] );
|
||||
|
||||
if (is_object( $taskUser )) {
|
||||
return - 1;
|
||||
//Check the usrUid value
|
||||
if (RBAC::isGuestUserUid($requestData['USR_UID'])) {
|
||||
throw new Exception(G::LoadTranslation("ID_USER_CAN_NOT_UPDATE", array($requestData['USR_UID'])));
|
||||
return false;
|
||||
}
|
||||
$oTaskUser = new TaskUser();
|
||||
$oTaskUser->fromArray( $aData, BasePeer::TYPE_FIELDNAME );
|
||||
if ($oTaskUser->validate()) {
|
||||
$oConnection->begin();
|
||||
$iResult = $oTaskUser->save();
|
||||
$oConnection->commit();
|
||||
return $iResult;
|
||||
|
||||
$taskUser = TaskUserPeer::retrieveByPK(
|
||||
$requestData['TAS_UID'],
|
||||
$requestData['USR_UID'],
|
||||
$requestData['TU_TYPE'],
|
||||
$requestData['TU_RELATION']
|
||||
);
|
||||
|
||||
if (is_object($taskUser)) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
$taskUser = new TaskUser();
|
||||
$taskUser->fromArray($requestData, BasePeer::TYPE_FIELDNAME);
|
||||
if ($taskUser->validate()) {
|
||||
$connection->begin();
|
||||
$result = $taskUser->save();
|
||||
$connection->commit();
|
||||
|
||||
return $result;
|
||||
} else {
|
||||
$sMessage = '';
|
||||
$aValidationFailures = $oTaskUser->getValidationFailures();
|
||||
$message = '';
|
||||
$aValidationFailures = $taskUser->getValidationFailures();
|
||||
foreach ($aValidationFailures as $oValidationFailure) {
|
||||
$sMessage .= $oValidationFailure->getMessage() . '<br />';
|
||||
$message .= $oValidationFailure->getMessage() . '<br />';
|
||||
}
|
||||
throw (new Exception( 'The registry cannot be created!<br />' . $sMessage ));
|
||||
throw (new Exception('The registry cannot be created!<br />' . $message));
|
||||
}
|
||||
} catch (Exception $oError) {
|
||||
$oConnection->rollback();
|
||||
$connection->rollback();
|
||||
throw ($oError);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -281,10 +281,20 @@ class Users extends BaseUsers
|
||||
return $row;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all information about the user
|
||||
* @param string $userUid
|
||||
* @return array $arrayData
|
||||
* @throws Exception
|
||||
*/
|
||||
public function getAllInformation ($userUid)
|
||||
{
|
||||
if (! isset( $userUid ) || $userUid == "") {
|
||||
throw (new Exception( "$userUid is empty." ));
|
||||
if (!isset($userUid) || empty($userUid)) {
|
||||
throw (new Exception('$userUid is empty.'));
|
||||
}
|
||||
if (RBAC::isGuestUserUid($userUid)) {
|
||||
throw new Exception(G::LoadTranslation("ID_USER_CAN_NOT_UPDATE", array($userUid)));
|
||||
return false;
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user