Page 1 of 1

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

Posted: Fri Sep 19, 2008 10:13 am
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

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

Posted: Fri Sep 19, 2008 10:57 am
by jmcgin51
{if $customcontent_memberof_group}
do this
{elseif $customcontent_memberof_group2}
do this
{/if}

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

Posted: Fri Sep 19, 2008 11:40 am
by Nick Smart
I do this in my template:

Code: Select all

	{ if $ccuser->loggedin() }
		{content block="protected"}
	{else}
		{content}
	{/if}
Nick

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

Posted: Fri Sep 19, 2008 1:50 pm
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

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

Posted: Fri Sep 19, 2008 2:22 pm
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

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

Posted: Fri Sep 19, 2008 2:56 pm
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

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

Posted: Fri Sep 19, 2008 8:21 pm
by Nick Smart
Sorry no, I've not tried to use it.

Nick