Check if feu user is logged in. I've tried this but...

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
sarah_h
Forum Members
Forum Members
Posts: 189
Joined: Tue Apr 25, 2006 8:30 am

Check if feu user is logged in. I've tried this but...

Post by sarah_h »

Hi All,

Working with FEU and Self Registration Modules with Cart and Products.

Now, I just need to do something simple here; to check to see whether the user is logged in or not so I can display a message. I've tried doing simple {if} tests within my templates using variations of:

$feu_smarty->LoggedIn()

$feu->LoggedIn()

$logged_in

but I always get errors relating to undefined functions and non member objects etc. Not really unexpected!

Hope someone can help in some way.

Sarah
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: Check if feu user is logged in. I've tried this but...

Post by jmcgin51 »

{if $customcontent_memberof_group}
do this
{elseif $customcontent_memberof_group2}
do this
{/if}
Nick Smart
Forum Members
Forum Members
Posts: 116
Joined: Mon Jul 28, 2008 4:48 pm

Re: Check if feu user is logged in. I've tried this but...

Post by Nick Smart »

I do this in my template:

Code: Select all

	{ if $ccuser->loggedin() }
		{content block="protected"}
	{else}
		{content}
	{/if}
Nick
sarah_h
Forum Members
Forum Members
Posts: 189
Joined: Tue Apr 25, 2006 8:30 am

Re: Check if feu user is logged in. I've tried this but...

Post by sarah_h »

Thanks for these replies. I'm a bit confused because your posts mention $ccuser. Am I correct in thinking this is the Custom Content module? If so I don't have that installed! I use FEU and Self Registration Modules with Cart and Products. Perhaps I'm using something?

Could you clarify.


Sarah
Nick Smart
Forum Members
Forum Members
Posts: 116
Joined: Mon Jul 28, 2008 4:48 pm

Re: Check if feu user is logged in. I've tried this but...

Post by Nick Smart »

I missed that. I've only used FEU with CC to control content display to signed-in users, so can't help you in your case I'm afraid.

As an after thought, you could try installing the Custom Content module, even if you don't do anything with it, and see if that gives you access to $ccuser in a way that is useful to you. It will only take a few minutes to check.

Nick
sarah_h
Forum Members
Forum Members
Posts: 189
Joined: Tue Apr 25, 2006 8:30 am

Re: Check if feu user is logged in. I've tried this but...

Post by sarah_h »

Thanks Nick, that might be worth a go. Have you had any success with {debug}? This could be very useful but I get a memory error and only see a few items!!

Sarah
Nick Smart
Forum Members
Forum Members
Posts: 116
Joined: Mon Jul 28, 2008 4:48 pm

Re: Check if feu user is logged in. I've tried this but...

Post by Nick Smart »

Sorry no, I've not tried to use it.

Nick
Post Reply

Return to “CMSMS Core”