BUG 0000 BUG 0000 User Inbox Simplified (second commit)

This commit is contained in:
Erik Amaru Ortiz
2012-01-26 09:33:01 -04:00
parent f5f4b527f5
commit 5599ca8b96
22 changed files with 900 additions and 229 deletions

View File

@@ -188,8 +188,11 @@ class UsersProperties extends BaseUsersProperties {
}
return $aErrors;
}
public function redirectTo($sUserUID, $sLanguage = 'en') {
public function redirectTo($sUserUID, $sLanguage = 'en')
{
global $RBAC;
//get the plugins, and check if there is redirectLogins
//if yes, then redirect goes according his Role
if ( class_exists('redirectDetail')) {
@@ -209,6 +212,36 @@ class UsersProperties extends BaseUsersProperties {
}
//end plugin
/**
* New feature - User Experience Redirector
* @author Erik Amaru Ortiz <erik@colosa.com>
*/
require_once 'classes/model/Users.php';
$u = UsersPeer::retrieveByPK($sUserUID);
$uxType = $u->getUsrUx();
// find a group setting
if ($uxType == '' || $uxType == 'NORMAL') {
require_once 'classes/model/GroupUser.php';
$gu = new GroupUser();
$ugList = $gu->getAllUserGroups($sUserUID);
foreach ($ugList as $row) {
if ($row['GRP_UX'] != 'NORMAL' && $row['GRP_UX'] != '') {
$uxType = $row['GRP_UX'];
break;
}
}
}
switch ($uxType) {
case 'SIMPLIFIED':
return '/sys' . SYS_SYS . '/' . $sLanguage . '/' . SYS_SKIN . '/' . 'home';
break;
}
#New feature by Erik erik@colosa.com>
#get user preferences for default redirect
#verifying if it has any preferences on the configurations table