Log in

View Full Version : Logout Link Problem - Please Help!


ChrisBaktis
07-25-2007, 01:19 AM
Im using the following code in the footer bar on my site so if a member is logged in they see the logout link - however when the link is clicked a popbox comes up and just says 'undefined' and im not sure why. Any suggestions?

<if condition="$bbuserinfo['userid'] <> 0"><a href="login.php?$session[sessionurl]do=logout&amp;logouthash=$bbuserinfo[logouthash]" onclick="return log_out()">$vbphrase[log_out]</a> -</if>

Weird find to this - If I right click the link and click 'open link in new window' then it works fine...no im really confused.

markbolyard
07-25-2007, 01:24 AM
Use this code:


<if condition="!$show['guest']">
<!-- member logout -->
<a href="login.php?$session[sessionurl]do=logout&amp;logouthash=$bbuserinfo[logouthash]" onclick="return log_out('$vbphrase[sure_you_want_to_log_out]')"><phrase 1="$bbuserinfo[username]">$vbphrase[log_out_x]</phrase></a> -
<!-- end member logout -->
</if>

ChrisBaktis
07-25-2007, 02:11 AM
Worked like a charm - thanks a million!

mikesharp
07-26-2007, 08:17 AM
how could i make a link on a non vb page to log out?

and what is logouthash ?