- Enhancement (Trac#189) first version of a (simple) End-Users portal.

- Fix for the appUserPreferences class

SVN:trunk[806]
This commit is contained in:
Denis Flaven
2010-09-10 10:10:57 +00:00
parent 7312d977f3
commit 463e7b5413
11 changed files with 79 additions and 7 deletions

View File

@@ -329,7 +329,14 @@ EOF
}
}
static function DoLogin($bMustBeAdmin = false)
/**
* Check if the user is already authentified, if yes, then performs some additional validations:
* - if $bMustBeAdmin is true, then the user must be an administrator, otherwise an error is displayed
* - if $bIsAllowedToPortalUsers is false and the user has only access to the portal, then the user is redirected to the portal
* @param bool $bMustBeAdmin Whether or not the user must be an admin to access the current page
* @param bool $bIsAllowedToPortalUsers Whether or not the current page is considered as part of the portal
*/
static function DoLogin($bMustBeAdmin = false, $bIsAllowedToPortalUsers = false)
{
$operation = utils::ReadParam('loginop', '');
session_start();
@@ -392,6 +399,11 @@ EOF
$oP->output();
exit;
}
elseif ( (!$bIsAllowedToPortalUsers) && (UserRights::IsPortalUser()))
{
// No rights to be here, redirect to the portal
header('Location: ../portal/index.php');
}
}
} // End of class