How to redirect logged out user from component pages

Sandeep Yadav Posted in Technical Support 8 years ago

Hi,

I am facing a problem when any user is logged out and he accessed any inner page , header and footer is not showing only component's view part is showing without any css style. Can anyone help me to redirect from any inner page to site home page if user is not logged in?

I tried if(!ossn_isLoggedin()) { redirect();} but after that I am unable to access site with error "domainname redirected you too many times".

Replies
in Sandeep Yadav Replied 8 years ago

http://www.mydomain.com/know-the-teams

Here is the code of ossncom.php file
define('TEAM', ossn
route()->com . 'Teams/');
requireonce(TEAM . 'classes/Teams.php');
function know
yourteaminit() {
ossnregisterpage('know-the-teams', 'knowtheteams');
}

function knowtheteams() {
$title = 'Know the Teams';
$contents['content'] = ossnpluginview('teams/teamlist');
$content = ossnsetpagelayout('home', $contents);
echo ossn
viewpage($title, $content);
}
ossn
registercallback('ossn', 'init', 'knowyourteaminit');

German Michael Zülsdorff Replied 8 years ago

Please,
provide at least 1 sample url (without domain part) where this happpens, and read:

https://www.opensource-socialnetwork.org/wiki/view/1101/how-to-report-a-bug