Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
public static function makePerms($perms, $is_admin)
{
$flags = new PlFlagSet($perms);
- $flags->addFlag(PERMS_USER);
if ($is_admin) {
$flags->addFlag(PERMS_ADMIN);
}
$this->securityChecks();
$this->setSkin();
$this->updateNbNotifs();
- check_redirect();
+ // Only check email redirection for 'internal' users.
+ if ($user->checkPerms(PERMS_USER)) {
+ check_redirect();
+ }
// We should not have to use this private data anymore
S::kill('auth_by_cookie');