almai
03-03-2014, 10:02 PM
I'd like to redirect all users which are not logged in to index.php. For that reason I put following code into the header template:
<vb:if condition="$bbuserinfo['usergroupid'] == 1 AND THIS_SCRIPT != 'index'">
<meta HTTP-EQUIV="REFRESH" content="0; url={vb:raw baseurl}">
</vb:if>
The first part checks, if the user is logged in. This one works as intended. The second part should check, if index.php is being displayed and therefore avoid an infinite loop. But no matter what I try, the system doesn't recognize, that the home page is being displayed. The browser refreshes the page over and over again
So my questions is: Are conditionals with "THE_SCRIPT" still working in vb5 or is there another way to retrieve the information, which page is actually being displayed. Or is there another problem that prevents the code from working properly.
Thanks in advance
<vb:if condition="$bbuserinfo['usergroupid'] == 1 AND THIS_SCRIPT != 'index'">
<meta HTTP-EQUIV="REFRESH" content="0; url={vb:raw baseurl}">
</vb:if>
The first part checks, if the user is logged in. This one works as intended. The second part should check, if index.php is being displayed and therefore avoid an infinite loop. But no matter what I try, the system doesn't recognize, that the home page is being displayed. The browser refreshes the page over and over again
So my questions is: Are conditionals with "THE_SCRIPT" still working in vb5 or is there another way to retrieve the information, which page is actually being displayed. Or is there another problem that prevents the code from working properly.
Thanks in advance