Log in

View Full Version : [Urgent] Check if user is logged in.


HKothari
02-18-2008, 12:12 AM
Can someone help me on this, I finally got a working login page to integrate my site by using the code from this page (http://www.vbulletin.com/forum/showthread.php?p=720724) but I can't seem to figure out how to hide the form and show something else if the user is already logged in. Anyone have ideas?

Hex_legend
02-18-2008, 01:17 AM
<if condition="$show['register']>
LOGIN CODE
<else />
Text for logged in users
</if>

How about that?

HKothari
02-18-2008, 01:29 AM
That didn't seem to work at all, it showed both the login code and the other.

What Do I have to include for this to work, that may be the problem.

Dismounted
02-18-2008, 03:59 AM
Is this on your own custom page? Could you post that page?

MiahBeSmokin420
02-18-2008, 07:51 AM
<if condition="$bbuserinfo[userid]">
Text For Logged In Users
<else />
LogIn Code
</if>

HKothari
02-18-2008, 11:14 AM
Is this on your own custom page? Could you post that page? http://www.truewebgaming.com
and to use the if statements, what do I need to include?

Also, can I just use php's if statements, and as far as the bbuser thing, what do I need to include?

Opserty
02-18-2008, 11:26 AM
<a href="https://vborg.vbsupport.ru/showthread.php?t=170110" target="_blank">https://vborg.vbsupport.ru/showthread.php?t=170110</a>

HKothari
02-18-2008, 11:49 AM
Ok, well, I followed that, but it says this when I test it:
Notice: Undefined index: HTTPS in /usr/local/pem/vhosts/133519/webspace/httpdocs/forums/includes/class_core.php on line 1591

Notice: Undefined index: HTTPS in /usr/local/pem/vhosts/133519/webspace/httpdocs/forums/includes/class_core.php on line 1591




Unable to add cookies, header already sent.
File: /usr/local/pem/vhosts/133519/webspace/httpdocs/forums/includes/class_core.php
Line: 1591


Any Ideas why?

--------------- Added 1203349108 at 1203349108 ---------------

I found out that it's a notice, so it's not important, but it still isn't checking whether the user is logged in. Anyone?

--------------- Added 1203352368 at 1203352368 ---------------

If you aren't logged in, all it does is show the error, and nothing else is loaded, if you are logged in, it just shows the notices at the top, but it loads the rest of the page