Page 1 of 1

[solved] FrontEndUsers - Login issue?

Posted: Wed Dec 09, 2015 1:57 am
by rbaby
CMSMS v1.12
CG Extensions 1.49.11
CG Simple Smarty 1.9.1
Custom Content 1.10
FrontEndUsers 1.30.6

I created a "secure" template with the following:

Code: Select all

{if $ccuser->loggedin()}
<h1>{title}</h1>
{content}
{else}
<h1>Login Required</h1>
<p>Please login for authorization to view content.</p>
{FrontEndUsers}
{/if}
I have a page that uses this template (page type: content--not protected) and I've used this approach in other installations before but this one doesn't seem to be cooperating. When I log in, it just refreshes the login page, no errors in console or logs that I can see at all.

Has anyone experienced this issue?

Re: FrontEndUsers - Logging in just reloads the login page?

Posted: Wed Dec 09, 2015 7:13 am
by Rolf
Why not use the protected page content type. You don't need the (deprecated) Custom Content module...

Re: FrontEndUsers - Logging in just reloads the login page?

Posted: Wed Dec 09, 2015 10:21 pm
by rbaby
Rolf wrote:Why not use the protected page content type. You don't need the (deprecated) Custom Content module...
Thanks Rolf, I will try that. I just got used to being able to prompt the login on every single page with the else, I didn't know how to do it as a Protected content page type.

Re: [solved] FrontEndUsers - Login issue?

Posted: Fri Dec 11, 2015 12:42 am
by Jeff
The page/template might be getting cached. So it since it is render without the user being login, then everyone will see that until cache is cleared.