1

Topic: logout problem pls help me

my first page i'm try to used Integrate Login/Logout
box but
this code can't use in 1.2.17
i got logout problem

this


else {
echo "Logged in as: ".pun_htmlspecialchars($pun_user['username'])."<br> Last visit: ". format_time($pun_user['last_visit'])."
<br>Click <a href=\"./forum/login.php?action=out&id=".$pun_user['id']."\">Log out</a>";

}


^^.

2 (edited by StevenBullen 2008-04-09 17:39)

Re: logout problem pls help me

Change this

else {
    echo "Logged in as: ".pun_htmlspecialchars($pun_user['username'])."<br> Last visit: ". format_time($pun_user['last_visit'])."<br>Click <a href=\"./forum/login.php?action=out&id=".$pun_user['id']."\">Log out</a>";
}

to this

else {
    echo "Logged in as: ".pun_htmlspecialchars($pun_user['username'])."<br /> Last visit: ". format_time($pun_user['last_visit'])."<br />Click <a href=\"./forum/login.php?action=out&id=".$pun_user['id']."&csrf_token=".sha1($pun_user['id'].sha1(get_remote_address()))."\">Log out</a>";
}

I have added this

&csrf_token=".sha1($pun_user['id'].sha1(get_remote_address()))."

which is a change made in 1.2.17.

Smartys: I downloaded the latest 1.2.17 and it has the above code. But if you browse the code on trac it calls pun_hash? instead of sha1? Seems wrong to me.
EDIT: Ok smartys ignore the above comment. wink 1.2.17 was released over a month ago and your changeset is dated a month ago. So it will be in 1.2.18. tongue

3

Re: logout problem pls help me

THANK!!! ^.^