mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-20 21:33:54 -07:00
Updated
This commit is contained in:
parent
9601aa0911
commit
e816be32df
2 changed files with 8 additions and 9 deletions
|
@ -849,7 +849,14 @@ function show_bt_userdata($user_id): void
|
|||
global $template;
|
||||
|
||||
if (!$btu = get_bt_userdata($user_id)) {
|
||||
return;
|
||||
// Generate passkey
|
||||
if (!\TorrentPier\Legacy\Torrent::getPasskey($user_id)) {
|
||||
if (!\TorrentPier\Legacy\Torrent::generate_passkey($user_id, true)) {
|
||||
bb_simple_die('Could not generate passkey');
|
||||
} else {
|
||||
show_bt_userdata($user_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$template->assign_vars([
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
namespace TorrentPier\Legacy\Common;
|
||||
|
||||
use TorrentPier\Legacy\DateDelta;
|
||||
use TorrentPier\Legacy\Torrent;
|
||||
use TorrentPier\Sessions;
|
||||
|
||||
use Exception;
|
||||
|
@ -253,13 +252,6 @@ class User
|
|||
$user_id = (int)$this->data['user_id'];
|
||||
$mod_admin_session = ((int)$this->data['user_level'] === ADMIN || (int)$this->data['user_level'] === MOD);
|
||||
|
||||
// Generate passkey
|
||||
if (!Torrent::getPasskey($this->data['user_id'])) {
|
||||
if (!Torrent::generate_passkey($this->data['user_id'], true)) {
|
||||
bb_simple_die('Could not generate passkey');
|
||||
}
|
||||
}
|
||||
|
||||
// Create new session
|
||||
for ($i = 0, $max_try = 5; $i <= $max_try; $i++) {
|
||||
$session_id = make_rand_str(SID_LENGTH);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue