Here's what I have at the moment
- Code: Select all
function after_action_login()
{
$auth =& Dataface_AuthenticationTool::getInstance();
$user =& $auth->getLoggedInUser();
$app = Dataface_Application::getInstance();
$query =& $app->getQuery();
switch($user->val('role'))
{
case 'ADMIN':
$query['-table'] = 'TableA';
break;
case 'UserA':
$query['-table'] = 'TableA';
break;
case 'UserB':
$query['-table'] = 'TableB';
break;
}
}