XF 1.2 redirect to log-in page

Adam Howard

Well-known member
Noticed a small change in 1.2

Before if I added this to a select page

PHP:
<xen:if is="{$visitor.user_id}">

PHP:
</xen:if>

The guest would be redirect to the log-in page or log-in overlay.

This doesn't seem to be true in XenForo 1.2 .... Rather they're show this

Capture.webp

^ Which isn't exactly helpful.

I know there is away to do it manually ....ie.. add the code to bring them to the log-on page, but I can't recall or seem to find it via search.
 
Noticed a small change in 1.2

Before if I added this to a select page

PHP:
<xen:if is="{$visitor.user_id}">

PHP:
</xen:if>

The guest would be redirect to the log-in page or log-in overlay.

This doesn't seem to be true in XenForo 1.2 .... Rather they're show this
I know there is away to do it manually ....ie.. add the code to bring them to the log-on page, but I can't recall or seem to find it via search.

Are you adding that code to the notable members template? I think I remember reading that was what was used now instead of the old template name. I'm not running 1.2 (not even on my test bed yet since there are still several add-on's I use that are not compatible).
 
Adding that xen:if won't automatically redirect guests.
You still need the redirect code.

Post exactly what you are entering and where.

Maybe it was an old add-on that made it happen.... But I'm trying through template modification

Recent Activity = news_feed_page_global

What's New? = find_new_threads

To make it so only members can see the above pages.

For now, I have it wrapped around with

PHP:
<xen:if is="{$visitor.user_id}">

</xen:if>
 
SOLVED

PHP:
<xen:if is="{$visitor.user_id}">

<xen:else />
<xen:title>{xen:phrase log_in}</xen:title>

<xen:include template="helper_login_form" />
</xen:if>

  • Simple
  • Clean

And it works good enough for me :)
 
Back
Top Bottom