Page 1 of 1

[solved] FEU - checking if user is loggen in

Posted: Thu Jul 04, 2013 6:42 am
by urheat
Hi!

I know that with CustomContent-module I can check if user is logged in. But I try to limit module installations.

So - is it possible with Frontend User -module to check if user is logged in?

I would use this in page template, where normally is a login link and when user is logged in, I would like to change it to "edit your properties" or something.

Thanks!

Re: FEU - checking if user is loggen in

Posted: Thu Jul 04, 2013 7:09 am
by uniqu3
You can for example assign FEU module on top of oyur template like {FrontEndUsers form='silent' assign='foo'} then you will have all variables available after this module call.

If you put {get_template_vars} in your template you will see available variables, for FEU you could check for example against user id like( i think it was $userid)

Code: Select all

{if $userid != ''}
    <!--  do something for logged in user -->
{/if}

Re: FEU - checking if user is loggen in

Posted: Thu Jul 04, 2013 7:21 am
by urheat
Thanks uniqu3!

This works fine :)

If I have {FrontEndUsers form='silent' assign='foo'} in page template, do I have to set pages cache-options somehow (the login page is non-cachable)?

And does this method have effect to page load times?