Forums / Setup & design / Howto show user info in pagelayout.tpl

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

Howto show user info in pagelayout.tpl

Author Message

Vegard Hansen

Friday 24 October 2003 12:34:04 am

Hi, i want to show some user information after the user has logged in. Like Welcome UsersName. Log out.

Anyone has the code for this?

Adolfo Barragán

Friday 24 October 2003 2:58:54 am

I do it so:

{section show=eq($current_user.contentobject_id,$anonymous_user_id)}
<a href={"user/login/"|ezurl}>Login</a> | <a href={"user/register"|ezurl}>Register</a>
{section-else}
<a ref={"user/logout/"|ezurl}>Logout ({$current_user.contentobject.name|wash})</a>
{/section}

Regards
Adolfo Barragán

Vegard Hansen

Friday 24 October 2003 5:18:49 am

Thanks alot!

That helps me for a lot of work.. :)