Page 1 of 1

[SOLVED] Custom Content / Frontend Users

Posted: Wed Apr 15, 2009 12:43 pm
by kateb
I have Custom Content and FEU users set up and working. When a user logs in they are redirected to their own page; I set this up in the redirection settings by using "{$username}". But, I am trying to set it so that each member of a specific group can only access their own page and nobody elses, regardless of whether they are in the same group or not. Currently, I have it set-up like this:

Code: Select all

  {cms_module module=CustomContent}
  {if $ccuser->loggedin() && $ccuser->memberof('clients')}
  {content}
  {/if}
This (obviously) lets all users of the same group access each other's pages. how do I restrict them to just their own? This is probably a basic question, and I have searched the forum, but with no luck. Thanks in advance for your help...

Re: Custom Content / Frontend Users

Posted: Wed Apr 15, 2009 2:58 pm
by tyman00
I don't know the exact syntax, but it should go something like this:

Code: Select all


  {if $ccuser->loggedin() && $ccuser->memberof('clients') && CC-USERNAME == $page_alias}
  {content}
  {/if}
Try working with that. Essentially you need to add another clause that states if the Logged In Users name also equals the page alias then display the content. This assumes that the pages you have created have aliases that match the usernames.

Re: Custom Content / Frontend Users

Posted: Wed Apr 15, 2009 3:26 pm
by kateb
Thanks tymann00!! I made a very small change to that code so it now reads:

Code: Select all

{if $ccuser->loggedin() && $ccuser->memberof('clients') && $ccuser->username() == $page_alias}
and now it works perfectly. Thanks so much!!

Re: Custom Content / Frontend Users

Posted: Wed Apr 15, 2009 4:15 pm
by tyman00
No problem. Glad it works. I didn't realize I was so close :)

I am also going to add solved to the title since you got it working.