OK, I have looked at the prattle source code but don't quite understand a few things:
After checking for login, the code does this:
session_register("uid");
session_register("hashid");
Now two session variables $uid, $hashid are stored.
Then on every protected page, this function is called:
function isloggedin()
{
global $uid;
global $hashid;
return ($hashid == makehashid($uid));
}
My question is:
In the isloggedin() function, both $uid and $hashid came from the session variables stored when the user login. Shouldn't ($hashid == makehashid($uid)) always return true? Or the user has to provide the $uid everytime?
Thanks!