Sunday 10 July 2005 3:02:22 am
hey ppl, how are you all? :)
as usual, i need ur help,
i want to check if the current user is logged in or not, so, i found this piece of code in one of the ez templates: {section show=eq($current_user.contentobject_id,$anonymous_user_id)}
<a class="menuitem" href={"/user/login/"|ezurl}>{"Login"|i18n("design/standard/layout")}</a>
{section-else}
<a class="menuitem" href={"/user/logout/"|ezurl}>{"Logout"|i18n("design/standard/layout")}</a> ({content_view_gui view=text_linked content_object=$current_user.contentobject})
{/section}
when i used this code, i found that it always displays "login", and it never displayes logout even if i am already signed in.
i really hope if someone can tell me what's wrong with that or if there is another way to implement this, i'll be very thankful. thanks all
|