mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-28 17:01:16 +00:00
Fix access to user profiles as admin. Closes #1058
This commit is contained in:
@@ -43,12 +43,17 @@ class ProfileController extends BasePageController
|
||||
if ($altID === false && $altUsername !== false) {
|
||||
$user = User::getByUsername($altUsername);
|
||||
if ($user) {
|
||||
$this->userdata = $user;
|
||||
$altID = $user['id'];
|
||||
$userID = $altID;
|
||||
}
|
||||
} elseif ($altID !== false) {
|
||||
$userID = $altID;
|
||||
$publicView = true;
|
||||
$user = User::find($altID);
|
||||
if ($user) {
|
||||
$this->userdata = $user;
|
||||
$userID = $altID;
|
||||
$publicView = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user