/** * New feature - User Experience Redirector * * @author Erik Amaru Ortiz <*****@*****.**> */ public function _getUXLocation() { require_once 'classes/model/Users.php'; $u = UsersPeer::retrieveByPK($this->usrID); $url = ''; $uxType = $u->getUsrUx(); $_SESSION['user_experience'] = 'NORMAL'; // find a group setting if ($uxType == '' || $uxType == 'NORMAL') { require_once 'classes/model/GroupUser.php'; $gu = new GroupUser(); $ugList = $gu->getAllUserGroups($this->usrID); foreach ($ugList as $row) { if ($row['GRP_UX'] != 'NORMAL' && $row['GRP_UX'] != '') { $uxType = $row['GRP_UX']; break; } } } switch ($uxType) { case 'SIMPLIFIED': case 'SWITCHABLE': case 'SINGLE': $_SESSION['user_experience'] = $uxType; $_SESSION['user_last_skin'] = SYS_SKIN; $url = '/sys' . SYS_SYS . '/' . $this->lang . '/uxs/' . 'home'; break; } return $url; }
/** * Get the user groups * @param string $usrUID the user identifier * @return array of user groups */ public function getUserGroups($usrUID) { $gu = new GroupUser(); $rows = $gu->getAllUserGroups($usrUID); return $rows; }