[SOLVED] Custom Content / Frontend Users

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
kateb
Forum Members
Forum Members
Posts: 13
Joined: Sun Jul 13, 2008 2:58 pm

[SOLVED] Custom Content / Frontend Users

Post 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...
Last edited by tyman00 on Wed Apr 15, 2009 4:15 pm, edited 1 time in total.
tyman00
Power Poster
Power Poster
Posts: 906
Joined: Tue Oct 24, 2006 5:59 pm

Re: Custom Content / Frontend Users

Post 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.
If all else fails, use a bigger hammer.
M@rtijn wrote: This is a community. This means that we work together and have the same goal (a beautiful CMS), not that we try to put people down and make their (voluntary) job as difficult as can be.
kateb
Forum Members
Forum Members
Posts: 13
Joined: Sun Jul 13, 2008 2:58 pm

Re: Custom Content / Frontend Users

Post 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!!
tyman00
Power Poster
Power Poster
Posts: 906
Joined: Tue Oct 24, 2006 5:59 pm

Re: Custom Content / Frontend Users

Post 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.
If all else fails, use a bigger hammer.
M@rtijn wrote: This is a community. This means that we work together and have the same goal (a beautiful CMS), not that we try to put people down and make their (voluntary) job as difficult as can be.
Post Reply

Return to “Modules/Add-Ons”