Hi and thanks a lot for your wonderful work at Devel.

I'd like to ask for a feature I'm more often missing in my daily work: A page to switch users like the "Switch user" block provided by devel offers.

The reason is that the block has to be re-embedded every time I install Devel on a page for example to debug something strange. This are some extra steps.
Despite that there are many helpful devel links and their pages in the Adminsitration menu, like "Field Info", "Execute PHP Code", ... (devel/*).

Is it possible to add a further page in the devel module that simply provides the user switcher on such a page so that you can easily switch the user (any user) without adding the block first?

There's already a switch user route:

devel.switch:
  path: '/devel/switch/{name}'
  defaults:
    _controller: '\Drupal\devel\Controller\SwitchUserController::switchUser'
    _title: 'Switch user'
    name: ''
  options:
    _admin_route: TRUE
  requirements:
    _permission: 'switch users'
    _csrf_token: 'TRUE'

There's a SwitchUserForm and SwitchUserController, but there's no dedicated page containing the form to switch the user (like in the block).

That would be a small addition but a big benefit.

Let's discuss that please and thank you so much!! :)

Issue fork devel-2464253

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

willzyx’s picture

Status: Active » Closed (outdated)

Closing for lack of activity. Feel free to reopen if the issue still exists

gagarine’s picture

Version: 7.x-1.x-dev » 8.x-2.x-dev
Status: Closed (outdated) » Active

I would still love to have a page somewhere like /devel/user/ where I can switch user without having to configure a block.

aangel’s picture

Me, too.

jonathan1055’s picture

Version: 8.x-2.x-dev » 8.x-3.x-dev

New features should go into the 3.x branch first.

Anybody’s picture

Issue summary: View changes
Anybody’s picture

What has to be done here is to create a route and a controller rendering the switch user form, which is currently only available via block.
The building blocks for this already exist.

jonathan1055’s picture

Yes, this feature would be good.

As I expect you know by now, the Devel module has now been migrated to https://gitlab.com/drupalspoons/devel within DrupalSpoons the home for Drupal modules on GitLab. All development, bug fixes and testing will be done over there. The drupal Devel issue queue has been disabled, so this issue is only findable by search from outside drupal.org.

This issue is now at https://gitlab.com/drupalspoons/devel/-/issues/208 so we should continue this discussion over there.

Anybody’s picture

Thank @jonathan1055 just saw that and added my comments over there :)