Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * check, if user is logged in and if
- * page exist and set the right jump-page-uid
- */
- if(!isset($this->page->rootLine[0]) || count($this->page->rootLine[0]) == 0 || $this->isPageHidden()) {
- // requested page doesn't exist
- $redirectId = $this->noPageFoundId;
- }elseif(!(is_array($GLOBALS['TSFE']->fe_user->user) && isset($GLOBALS['TSFE']->fe_user->user['usergroup']) && count($GLOBALS['TSFE']->fe_user->user['usergroup']) > 0)){
- // requested page exists, but user is not logged in
- $redirectId = $this->loginId;
- } else {
- // user is logged in, requested page exist
- $redirectId = $this->accessDeniedId;
- }
- $url = $_SERVER['SCRIPT_NAME'].'?id='.$redirectId;
- $redirectUrl = $this->getRedirectFromRequestUri();
- $appendChar = $this->getAppendChar($url);
- if($redirectId != $this->noPageFoundId
- && $redirectUrl != $redirectId
- && $redirectUrl != '/'
- && $redirectUrl != ''){
- $url .= $appendChar . $this->redirectUrlParam . '=' . urlencode($redirectUrl);
- }
- // relocate to new url
- header('location:'.$url);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement