Redirect to login form if a guest member - Redirect returns plain text.

 
Harry Richardson
 
Avatar
 
 
Harry Richardson
Total Posts:  1
Joined  18-05-2015
 
 
 
18 May 2015 18:39
 

Hi there,

Just bought this theme, loving the responsiveness and out-of-the-box ready themes.

I’m building a forum which I want to only be accessible to members, and so guests can’t see the forum at all until logged in.

I’ve tried to add a simple conditional based on logged in status into the html_header.html file:

/signin/ is a custom login forum I’m building.

{if logged_out}
 {redirect
="/signin/"}
{
/if} 

It seems like the {redirect} function returns as plain text in the header rather than redirecting a guest user.

Am I missing something? - Or is there a better way to handle guest users?

Thanks,

Harry

 
eeBootstrap Support Team
 
Avatar
 
 
eeBootstrap Support Team
Total Posts:  105
Joined  22-09-2014
 
 
 
19 May 2015 09:30
 

A quick solution is to set ALL the forums in Forum Management -> Permissions -> Can View Forum: ONLY for logged in users…

 
 
eeBootstrap Support Team
 
Avatar
 
 
eeBootstrap Support Team
Total Posts:  105
Joined  22-09-2014
 
 
 
19 May 2015 09:33
 
Harry Richardson - 18 May 2015 06:39 PM

I’ve tried to add a simple conditional based on logged in status into the html_header.html file:

/signin/ is a custom login forum I’m building.

{if logged_out}
 {redirect
="/signin/"}
{
/if} 

It seems like the {redirect} function returns as plain text in the header rather than redirecting a guest user.

Am I missing something? - Or is there a better way to handle guest users?

This instruction run only if the forum is running through regular templates… (Other Features)

 
 
Harry Richardson 1
 
Avatar
 
 
Harry Richardson 1
Total Posts:  2
Joined  19-05-2015
 
 
 
19 May 2015 12:49
 

Thanks for the quick reply, will look into regular templates for forums!