mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
[ticket/security/276] Centralise call for token expiration
SECURITY-276
This commit is contained in:
@@ -337,12 +337,12 @@ class add extends command
|
||||
|
||||
$sql_ary = [
|
||||
'user_actkey' => $user_actkey,
|
||||
'user_actkey_expiration' => strtotime('+1 day'),
|
||||
'user_actkey_expiration' => \phpbb\user::get_token_expiration(),
|
||||
];
|
||||
|
||||
$sql = 'UPDATE ' . USERS_TABLE . '
|
||||
SET ' . $this->db->sql_build_array('UPDATE', $sql_ary) . '
|
||||
WHERE user_id = ' . $user_id;
|
||||
WHERE user_id = ' . (int) $user_id;
|
||||
$this->db->sql_query($sql);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user