Drupal - Is it possible to login as / switch to a specific user using their password hash from the DB?

There's Masquerade.

Masquerade adds some items to the Navigation menu to allow quick switching and switching back. It also creates a "Masquerade" block for quick switching which can be added to a sidebar or elsewhere on your site. It is visible only to those users with permission to masquerade.

Another module which accomplishes something similar is Role Switcher.

--a different Dan H


drush user-login allows you to easily log in as any user.

Compared to a module that "emulates" a different users session:

The disadvantage is that this will require a separate session, often that just means a new browser (window).

The advantage is that you know for certain that you see what the user sees.

This will not explicitly change the password for the user but you will be able to change the password of the user once you login.

Display a one time login link for the given user account (defaults to uid 1).

Example:

"drush user-login ryan"

Displays a one-time login link for the user ryan.

Aliases: uli


I created masquerade_drush in the Masquerade Extras suite to help this exact issue. Check it out http://dgo.to/masquerade_extras

Tags:

Users

7