Skip to content

Commit e753501

Browse files
committed
oitController: remove /user/me/edit
This can be accomplished with /user/edit today, I don't think that was an option when I created this. From what I can tell nothing uses this path so should be safe to remove.
1 parent d8b7f5b commit e753501

2 files changed

Lines changed: 0 additions & 30 deletions

File tree

oit.routing.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,6 @@ oit.health:
4242
_title: 'Service Health'
4343
requirements:
4444
_permission: 'access content'
45-
oit.useredit:
46-
path: '/user/me/edit'
47-
defaults:
48-
_controller: '\Drupal\oit\Controller\OitController::oitUserEdit'
49-
_title: ''
50-
requirements:
51-
_role: 'authenticated'
5245
oit.abusetable:
5346
path: '/admin/config/people/autoban/abusetable'
5447
defaults:

src/Controller/OitController.php

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
use Drupal\Core\Logger\LoggerChannelFactoryInterface;
1212
use Drupal\Core\PageCache\ResponsePolicy\KillSwitch;
1313
use Drupal\Core\Render\RendererInterface;
14-
use Drupal\Core\Session\AccountInterface;
1514
use Drupal\Core\State\StateInterface;
1615
use Drupal\Core\Url;
1716
use Drupal\oit\Plugin\BlockUuidQuery;
@@ -28,13 +27,6 @@
2827
*/
2928
class OitController extends ControllerBase {
3029

31-
/**
32-
* Object used to get request data, such as the hash.
33-
*
34-
* @var \Drupal\Core\Session\AccountInterface
35-
*/
36-
protected $account;
37-
3830
/**
3931
* Object used to get request data, such as the hash.
4032
*
@@ -115,8 +107,6 @@ class OitController extends ControllerBase {
115107
/**
116108
* Constructs request stuff.
117109
*
118-
* @param \Drupal\Core\Session\AccountInterface $account
119-
* Interact with Private temporary storage.
120110
* @param \Drupal\oit\Plugin\BlockUuidQuery $block_uuid_query
121111
* Get block uuid.
122112
* @param \Symfony\Component\HttpFoundation\RequestStack $request_stack
@@ -141,7 +131,6 @@ class OitController extends ControllerBase {
141131
* The state service.
142132
*/
143133
public function __construct(
144-
AccountInterface $account,
145134
BlockUuidQuery $block_uuid_query,
146135
RequestStack $request_stack,
147136
LoggerChannelFactoryInterface $logger_factory,
@@ -154,7 +143,6 @@ public function __construct(
154143
ShortcodeIcon $shortcode_svg_icon,
155144
StateInterface $state,
156145
) {
157-
$this->account = $account;
158146
$this->requestStack = $request_stack->getCurrentRequest();
159147
$this->blockUuidQuery = $block_uuid_query;
160148
$this->loggerFactory = $logger_factory->get('oit');
@@ -173,7 +161,6 @@ public function __construct(
173161
*/
174162
public static function create(ContainerInterface $container): self {
175163
return new self(
176-
$container->get('current_user'),
177164
$container->get('oit.block.uuid.query'),
178165
$container->get('request_stack'),
179166
$container->get('logger.factory'),
@@ -384,16 +371,6 @@ private function deniedContent() {
384371
return $content;
385372
}
386373

387-
/**
388-
* Create page to forward user to their profile.
389-
*/
390-
public function oitUserEdit() {
391-
$nid = $this->account->id();
392-
$path = Url::fromRoute('entity.user.edit_form', ['user' => $nid])->toString();
393-
394-
return new RedirectResponse($path);
395-
}
396-
397374
/**
398375
* Request Catalog page.
399376
*/

0 commit comments

Comments
 (0)