Updated session / cookie support

This commit is contained in:
laf
2014-02-03 22:32:45 +00:00
parent 04a9f4a2f3
commit 005504ae6d
6 changed files with 67 additions and 14 deletions

View File

@ -36,6 +36,22 @@ function authenticate($username,$password)
return 0;
}
function reauthenticate($sess_id,$token)
{
list($uname,$hash) = explode("|",$token);
$session = dbFetchRow("SELECT * FROM `session` WHERE `session_username` = '$uname' AND session_value='$sess_id'");
$hasher = new PasswordHash(8, FALSE);
if($hasher->CheckPassword($uname.$session['session_token'],$hash))
{
$_SESSION['username'] = $uname;
return 1;
}
else
{
return 0;
}
}
function passwordscanchange($username = "")
{
/*