mirror of
https://github.com/friendica/friendica
synced 2025-02-04 22:18:51 +00:00
Partially revert "Improve search for user in Modration module"
This reverts commit 78444ff25c
.
↪️ When the uid parameter isn't set, the regular list should be shown instead of throwing an error.
This commit is contained in:
parent
d97b8f8faa
commit
3e465cb761
3 changed files with 18 additions and 27 deletions
|
@ -51,15 +51,12 @@ class Active extends BaseUsers
|
|||
$action = (string) $this->parameters['action'] ?? '';
|
||||
$uid = (int) $this->parameters['uid'] ?? 0;
|
||||
|
||||
if ($uid === 0) {
|
||||
$this->systemMessages->addNotice($this->t('User not found'));
|
||||
$this->baseUrl->redirect('moderation/users');
|
||||
}
|
||||
|
||||
$user = User::getById($uid, ['username', 'blocked']);
|
||||
if (!is_array($user)) {
|
||||
$this->systemMessages->addNotice($this->t('User not found'));
|
||||
$this->baseUrl->redirect('moderation/users');
|
||||
if ($uid !== 0) {
|
||||
$user = User::getById($uid, ['username', 'blocked']);
|
||||
if (!$user) {
|
||||
$this->systemMessages->addNotice($this->t('User not found'));
|
||||
$this->baseUrl->redirect('moderation/users');
|
||||
}
|
||||
}
|
||||
|
||||
switch ($action) {
|
||||
|
|
|
@ -51,15 +51,12 @@ class Blocked extends BaseUsers
|
|||
$action = (string) $this->parameters['action'] ?? '';
|
||||
$uid = (int) $this->parameters['uid'] ?? 0;
|
||||
|
||||
if ($uid === 0) {
|
||||
$this->systemMessages->addNotice($this->t('User not found'));
|
||||
$this->baseUrl->redirect('moderation/users');
|
||||
}
|
||||
|
||||
$user = User::getById($uid, ['username', 'blocked']);
|
||||
if (!is_array($user)) {
|
||||
$this->systemMessages->addNotice($this->t('User not found'));
|
||||
$this->baseUrl->redirect('moderation/users');
|
||||
if ($uid !== 0) {
|
||||
$user = User::getById($uid, ['username', 'blocked']);
|
||||
if (!$user) {
|
||||
$this->systemMessages->addNotice($this->t('User not found'));
|
||||
$this->baseUrl->redirect('moderation/users');
|
||||
}
|
||||
}
|
||||
|
||||
switch ($action) {
|
||||
|
|
|
@ -58,15 +58,12 @@ class Index extends BaseUsers
|
|||
$action = (string) $this->parameters['action'] ?? '';
|
||||
$uid = (int) $this->parameters['uid'] ?? 0;
|
||||
|
||||
if ($uid === 0) {
|
||||
$this->systemMessages->addNotice($this->t('User not found'));
|
||||
$this->baseUrl->redirect('moderation/users');
|
||||
}
|
||||
|
||||
$user = User::getById($uid, ['username', 'blocked']);
|
||||
if (!is_array($user)) {
|
||||
$this->systemMessages->addNotice($this->t('User not found'));
|
||||
$this->baseUrl->redirect('moderation/users');
|
||||
if ($uid !== 0) {
|
||||
$user = User::getById($uid, ['username', 'blocked']);
|
||||
if (!$user) {
|
||||
$this->systemMessages->addNotice($this->t('User not found'));
|
||||
$this->baseUrl->redirect('moderation/users');
|
||||
}
|
||||
}
|
||||
|
||||
switch ($action) {
|
||||
|
|
Loading…
Add table
Reference in a new issue