mirror of https://github.com/BOINC/boinc.git
web: ensure that login token is valid for 24 hours
This commit is contained in:
parent
80a2cae9b7
commit
c8aa75b5ef
|
@ -26,6 +26,7 @@
|
|||
function make_login_token($user) {
|
||||
$now = time();
|
||||
if ($now - $user->login_token_time < 86400) {
|
||||
$user->update("login_token_time=$now");
|
||||
return $user->login_token;
|
||||
}
|
||||
$token = substr(random_string(), 0, 8);
|
||||
|
|
Loading…
Reference in New Issue