mirror of
https://github.com/friendica/friendica
synced 2025-02-05 00:58: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'] ?? '';
|
$action = (string) $this->parameters['action'] ?? '';
|
||||||
$uid = (int) $this->parameters['uid'] ?? 0;
|
$uid = (int) $this->parameters['uid'] ?? 0;
|
||||||
|
|
||||||
if ($uid === 0) {
|
if ($uid !== 0) {
|
||||||
$this->systemMessages->addNotice($this->t('User not found'));
|
$user = User::getById($uid, ['username', 'blocked']);
|
||||||
$this->baseUrl->redirect('moderation/users');
|
if (!$user) {
|
||||||
}
|
$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');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
switch ($action) {
|
switch ($action) {
|
||||||
|
|
|
@ -51,15 +51,12 @@ class Blocked extends BaseUsers
|
||||||
$action = (string) $this->parameters['action'] ?? '';
|
$action = (string) $this->parameters['action'] ?? '';
|
||||||
$uid = (int) $this->parameters['uid'] ?? 0;
|
$uid = (int) $this->parameters['uid'] ?? 0;
|
||||||
|
|
||||||
if ($uid === 0) {
|
if ($uid !== 0) {
|
||||||
$this->systemMessages->addNotice($this->t('User not found'));
|
$user = User::getById($uid, ['username', 'blocked']);
|
||||||
$this->baseUrl->redirect('moderation/users');
|
if (!$user) {
|
||||||
}
|
$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');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
switch ($action) {
|
switch ($action) {
|
||||||
|
|
|
@ -58,15 +58,12 @@ class Index extends BaseUsers
|
||||||
$action = (string) $this->parameters['action'] ?? '';
|
$action = (string) $this->parameters['action'] ?? '';
|
||||||
$uid = (int) $this->parameters['uid'] ?? 0;
|
$uid = (int) $this->parameters['uid'] ?? 0;
|
||||||
|
|
||||||
if ($uid === 0) {
|
if ($uid !== 0) {
|
||||||
$this->systemMessages->addNotice($this->t('User not found'));
|
$user = User::getById($uid, ['username', 'blocked']);
|
||||||
$this->baseUrl->redirect('moderation/users');
|
if (!$user) {
|
||||||
}
|
$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');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
switch ($action) {
|
switch ($action) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue