Skip to content

user:login

Display a one time login link for user ID 1, or another user.

Examples

  • drush user:login. Open default web browser and browse to homepage, logged in as uid=1.
  • drush user:login --name=ryan node/add/blog. Open default web browser (if configured or detected) for a one-time login link for username ryan that redirects to node/add/blog.
  • drush user:login --uid=123. Open default web browser and login as user with uid "123".
  • drush user:login --mail=foo@bar.com. Open default web browser and login as user with mail "foo@bar.com".
  • drush user:login --browser=firefox --name=$(drush user:information --mail="drush@example.org" --fields=name --format=string). Open firefox web browser, and login as the user with the e-mail address drush@example.org.

Arguments

  • [--path]. Optional path to redirect to after logging in.

Options

  • --name[=NAME]. A user name to log in as.
  • --uid[=UID]. A uid to log in as.
  • --mail[=MAIL]. A user mail address to log in as.
  • --browser[=BROWSER]. Optional value denotes which browser to use (defaults to operating system default). Use --no-browser to suppress opening a browser. [default: 1]
  • --redirect-port=REDIRECT-PORT. A custom port for redirecting to (e.g., when running within a Vagrant environment)
  • --no-browser. Negate --browser option.

Aliases

  • uli
  • user-login

Legend

  • An argument or option with square brackets is optional.
  • Any default value is listed at end of arg/option description.
  • An ellipsis indicates that an argument accepts multiple values separated by a space.