Single page protection??

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Locked
longshot
New Member
New Member
Posts: 3
Joined: Tue Feb 02, 2010 8:20 am

Single page protection??

Post 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 :-)
kendo451

Re: Single page protection??

Post 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.
longshot
New Member
New Member
Posts: 3
Joined: Tue Feb 02, 2010 8:20 am

Re: Single page protection??

Post 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??
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: Single page protection??

Post 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.
kendo451

Re: Single page protection??

Post 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.
Locked

Return to “[locked] Installation, Setup and Upgrade”