diff --git a/src/Module/Moderation/Users/Create.php b/src/Module/Moderation/Users/Create.php index a017cf681e..e4b802baff 100644 --- a/src/Module/Moderation/Users/Create.php +++ b/src/Module/Moderation/Users/Create.php @@ -32,7 +32,7 @@ class Create extends BaseUsers { $this->checkModerationAccess(); - self::checkFormSecurityTokenRedirectOnError('/admin/users/create', 'admin_users_create'); + self::checkFormSecurityTokenRedirectOnError('moderation/users/create', 'admin_users_create'); $nu_name = $request['new_user_name'] ?? ''; $nu_nickname = $request['new_user_nickname'] ?? ''; @@ -42,20 +42,20 @@ class Create extends BaseUsers if ($nu_name !== '' && $nu_email !== '' && $nu_nickname !== '') { try { User::createMinimal($nu_name, $nu_email, $nu_nickname, $nu_language); - $this->baseUrl->redirect('admin/users'); + $this->baseUrl->redirect('moderation/users'); } catch (\Exception $ex) { $this->systemMessages->addNotice($ex->getMessage()); } } - $this->baseUrl->redirect('admin/users/create'); + $this->baseUrl->redirect('moderation/users/create'); } protected function content(array $request = []): string { parent::content(); - $t = Renderer::getMarkupTemplate('admin/users/create.tpl'); + $t = Renderer::getMarkupTemplate('moderation/users/create.tpl'); return self::getTabsHTML('all') . Renderer::replaceMacros($t, [ // strings // '$title' => $this->t('Administration'), diff --git a/src/Module/Moderation/Users/Pending.php b/src/Module/Moderation/Users/Pending.php index 569d0404c7..465f6fbfa1 100644 --- a/src/Module/Moderation/Users/Pending.php +++ b/src/Module/Moderation/Users/Pending.php @@ -33,7 +33,7 @@ class Pending extends BaseUsers { $this->checkModerationAccess(); - self::checkFormSecurityTokenRedirectOnError('/admin/users/pending', 'admin_users_pending'); + self::checkFormSecurityTokenRedirectOnError('moderation/users/pending', 'admin_users_pending'); $pending = $request['pending'] ?? []; @@ -51,7 +51,7 @@ class Pending extends BaseUsers $this->systemMessages->addInfo($this->tt('%s registration revoked', '%s registrations revoked', count($pending))); } - $this->baseUrl->redirect('admin/users/pending'); + $this->baseUrl->redirect('moderation/users/pending'); } protected function content(array $request = []): string @@ -65,22 +65,22 @@ class Pending extends BaseUsers $user = User::getById($uid, ['username', 'blocked']); if (!$user) { $this->systemMessages->addNotice($this->t('User not found')); - $this->baseUrl->redirect('admin/users'); + $this->baseUrl->redirect('moderation/users'); } } switch ($action) { case 'allow': - self::checkFormSecurityTokenRedirectOnError('/admin/users/pending', 'admin_users_pending', 't'); + self::checkFormSecurityTokenRedirectOnError('moderation/users/pending', 'admin_users_pending', 't'); User::allow(Register::getPendingForUser($uid)['hash'] ?? ''); $this->systemMessages->addNotice($this->t('Account approved.')); - $this->baseUrl->redirect('admin/users/pending'); + $this->baseUrl->redirect('moderation/users/pending'); break; case 'deny': - self::checkFormSecurityTokenRedirectOnError('/admin/users/pending', 'admin_users_pending', 't'); + self::checkFormSecurityTokenRedirectOnError('moderation/users/pending', 'admin_users_pending', 't'); User::deny(Register::getPendingForUser($uid)['hash'] ?? ''); $this->systemMessages->addNotice($this->t('Registration revoked')); - $this->baseUrl->redirect('admin/users/pending'); + $this->baseUrl->redirect('moderation/users/pending'); break; } @@ -90,7 +90,7 @@ class Pending extends BaseUsers $count = Register::getPendingCount(); - $t = Renderer::getMarkupTemplate('admin/users/pending.tpl'); + $t = Renderer::getMarkupTemplate('moderation/users/pending.tpl'); return self::getTabsHTML('pending') . Renderer::replaceMacros($t, [ // strings // '$title' => $this->t('Administration'), diff --git a/src/Module/Notifications/Ping.php b/src/Module/Notifications/Ping.php index e80d3b8ee0..2eaa2c4a5c 100644 --- a/src/Module/Notifications/Ping.php +++ b/src/Module/Notifications/Ping.php @@ -241,7 +241,7 @@ class Ping extends BaseModule ], $this->l10n->t('{0} requested registration'), new \DateTime($reg['created'], new \DateTimeZone('UTC')), - new Uri($this->baseUrl->get(true) . '/admin/users/pending') + new Uri($this->baseUrl->get(true) . '/moderation/users/pending') ); } } elseif (count($registrations) > 1) { @@ -252,7 +252,7 @@ class Ping extends BaseModule ], $this->l10n->t('{0} and %d others requested registration', count($registrations) - 1), new \DateTime($registrations[0]['created'], new \DateTimeZone('UTC')), - new Uri($this->baseUrl->get(true) . '/admin/users/pending') + new Uri($this->baseUrl->get(true) . '/moderation/users/pending') ); } diff --git a/src/Module/Register.php b/src/Module/Register.php index c168c517ef..ad3e1feeac 100644 --- a/src/Module/Register.php +++ b/src/Module/Register.php @@ -406,11 +406,11 @@ class Register extends BaseModule 'type' => Model\Notification\Type::SYSTEM, 'event' => $event, 'uid' => $admin['uid'], - 'link' => DI::baseUrl()->get(true) . '/admin/users/', + 'link' => DI::baseUrl()->get(true) . '/moderation/users/', 'source_name' => $user['username'], 'source_mail' => $user['email'], 'source_nick' => $user['nickname'], - 'source_link' => DI::baseUrl()->get(true) . '/admin/users/', + 'source_link' => DI::baseUrl()->get(true) . '/moderation/users/', 'source_photo' => User::getAvatarUrl($user, Proxy::SIZE_THUMB), 'show_in_notification_page' => false ]); diff --git a/view/templates/moderation/users/active.tpl b/view/templates/moderation/users/active.tpl index 8ec13e1fea..482cecaf89 100644 --- a/view/templates/moderation/users/active.tpl +++ b/view/templates/moderation/users/active.tpl @@ -23,7 +23,7 @@