Page 1 of 1

Single page protection??

Posted: Thu Feb 18, 2010 2:10 am
by longshot
Hi folks,

im very stressed. I can not figure out how to limit viewing page content to authorised users.. any help is apprecited.

I current have installed cms 1.6.6, FEUsers, FEUsersPermissons, Customcontent

All im trying to do is have a single page that is protected/limited to authenticated Front-End users, else show nice you cant see it message. I have tried permissions but cant figure that out, never got customcontent working without giving me constant smarty errors.

I have played with all the above and feel pretty darn stoopid right now. Please, help :-)

Re: Single page protection??

Posted: Thu Feb 18, 2010 2:43 am
by kendo451
This example assumes you've created a group called "Admin" that is the only group you want to allow access to.

Code: Select all

{if $ccuser->loggedin() && $ccuser->memberof('Admin') }
<!-- content for logged in users in Admin group goes here -->

{else}

<!-- content for person not member of Admin or not logged in goes here -->

{/if}
If you don't care which group they are in as long as they are logged in use this instead:

Code: Select all

{if $ccuser->loggedin()  }
<!-- content for logged in users goes here -->

{else}

<!-- content for not-logged in person goes here -->

{/if}
You will probably want to either put this in a global content block or else go to the page options and disable the WYSIWYG because it converts "->" into "->" and breaks your code.

Re: Single page protection??

Posted: Thu Feb 18, 2010 4:17 am
by longshot
cool thanx.. not sure if i should make a new post but since it's in the same vein...

I have this set up with the page protection working/redirect to login for non-authed etc.. all good.

Now i need to logout. I need to change the logout method to not only logout but return to root (../ | ./index.php). Current returns to login screen from page protection and it doesnt flow particularly nicely, you get the idea. Any thoughts??

Re: Single page protection??

Posted: Thu Feb 18, 2010 4:23 am
by jmcgin51
longshot wrote: Now i need to logout. I need to change the logout method to not only logout but return to root (../ | ./index.php). Current returns to login screen from page protection and it doesnt flow particularly nicely, you get the idea. Any thoughts??
Check the FEU preferences.  There is a field for the "redirect on logout" page.

Re: Single page protection??

Posted: Thu Feb 18, 2010 5:38 am
by kendo451
Log in to your admin panel.

Hover your mouse over Extensions and click on "Modules".

Find the FrontEndUsers module and click the link for module help.  Then read it.