1

Topic: Can not Logout PunBB

I can not logout my punbb. It seems problem of Private Message Mod 1.2.3

I search on the forum and I find include/functions.php, this file is about Logout.

I instllal Private Message Mod 1.2.3, and it ask me change include/functions.php as below.

I turn off Private Message Mod and change include/functions.php to original. And it is Ok.

I need this Private Message Mod, can someone tell me how can I solve this problem or this is not Private Message Mod's problem, I make mistake.


sorry about my english and thanks.




#---------[ 10. OPEN ]---------------------------------------------------------
#

include/functions.php

#
#---------[ 11. FIND (line: 250) ]-------------------------------------------------
#

        if ($pun_user['g_id'] > PUN_MOD)
        {
            if ($pun_user['g_search'] == '1')
                $links[] = '<li id="navsearch"><a href="search.php">'.$lang_common['Search'].'</a>';

            $links[] = '<li id="navprofile"><a href="profile.php?id='.$pun_user['id'].'">'.$lang_common['Profile'].'</a>';
            $links[] = '<li id="navlogout"><a href="login.php?action=out&id='.$pun_user['id'].'">'.$lang_common['Logout'].'</a>';
        }
        else
        {
            $links[] = '<li id="navsearch"><a href="search.php">'.$lang_common['Search'].'</a>';
            $links[] = '<li id="navprofile"><a href="profile.php?id='.$pun_user['id'].'">'.$lang_common['Profile'].'</a>';
            $links[] = '<li id="navadmin"><a href="admin_index.php">'.$lang_common['Admin'].'</a>';
            $links[] = '<li id="navlogout"><a href="login.php?action=out&id='.$pun_user['id'].'">'.$lang_common['Logout'].'</a>';
        }
   
#
#---------[ 12. REPLACE WITH ]---------------------------------------------------------
#

        if ($pun_user['g_id'] > PUN_MOD)
        {
            if ($pun_user['g_search'] == '1')
                $links[] = '<li id="navsearch"><a href="search.php">'.$lang_common['Search'].'</a>';

            $links[] = '<li id="navprofile"><a href="profile.php?id='.$pun_user['id'].'">'.$lang_common['Profile'].'</a>';
            require(PUN_ROOT.'include/pms/functions_navlinks.php');
            $links[] = '<li id="navlogout"><a href="login.php?action=out&id='.$pun_user['id'].'">'.$lang_common['Logout'].'</a>';
        }
        else
        {
            $links[] = '<li id="navsearch"><a href="search.php">'.$lang_common['Search'].'</a>';
            $links[] = '<li id="navprofile"><a href="profile.php?id='.$pun_user['id'].'">'.$lang_common['Profile'].'</a>';
            $links[] = '<li id="navadmin"><a href="admin_index.php">'.$lang_common['Admin'].'</a>';
            require(PUN_ROOT.'include/pms/functions_navlinks.php');
            $links[] = '<li id="navlogout"><a href="login.php?action=out&id='.$pun_user['id'].'">'.$lang_common['Logout'].'</a>';
        }

Re: Can not Logout PunBB

Exactly the same thing here. Have jumped from 1.2.14 to 1.2.17 by taking 1.2.17 and reapplying all the mods.
Tonight I reinstalled PM's and I have exactly the same issue as the OP.
I've had a hack about but cant find any solution.
I've deleted myself from the _online db, cleared cookies but nothing has worked, when I login again I cant logout.
All help is appreciated !
thanks, Robert

Re: Can not Logout PunBB

if you use 1.2.17 then

this line:
$links[] = '<li id="navlogout"><a href="login.php?action=out&id='.$pun_user['id'].'">'.$lang_common['Logout'].'</a>';

should look like:
$links[] = '<li id="navlogout"><a href="login.php?action=out&id='.$pun_user['id'].'&csrf_token='.sha1($pun_user['id'].sha1(get_remote_address())).'">'.$lang_common['Logout'].'</a>';

Re: Can not Logout PunBB

Doh!
I should have compared the 1.2.17 version with the PM install instructions!
Yes, works now, thanks!

Re: Can not Logout PunBB

I had a simaler problem so I know how you could look over it smile