Added passkey check in get_bt_userdata (#621)

This commit is contained in:
Roman Kelesidis 2023-03-17 21:50:29 +07:00 committed by GitHub
commit 4e8e181d8c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 18 deletions

View file

@ -135,10 +135,7 @@ switch ($field) {
$value = sprintf('%.0f', $value);
$this->response['new_value'] = humn_size($value, null, null, ' ');
if (!$btu = get_bt_userdata($user_id)) {
\TorrentPier\Legacy\Torrent::generate_passkey($user_id, true);
$btu = get_bt_userdata($user_id);
}
$btu = get_bt_userdata($user_id);
$btu[$field] = $value;
$this->response['update_ids']['u_ratio'] = (string)get_bt_ratio($btu);
break;