Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't issue a link for User 1 if disabled #4927

Closed
Genero-Jay opened this issue Dec 12, 2021 · 2 comments
Closed

Don't issue a link for User 1 if disabled #4927

Genero-Jay opened this issue Dec 12, 2021 · 2 comments

Comments

@Genero-Jay
Copy link

Is your feature request related to a problem? Please describe.
drush uli when called without any arguments provides a login link for User 1. However, I (and many others) disable User 1 after other site administrators are created. So often I'll come to a site that I haven't used recently, and this happens:

  1. I generate login link
  2. Use the login link on the given site
  3. Get an access denied error
  4. Remember that user 1 is blocked
  5. Start again

Describe the solution you'd like
I'm thinking that drush uli could have it's UX improved by either throwing an exception if the user is blocked, or appending a message mentioning that the user is blocked along with the link.

A further improvement could be to introduce a dialogue:

  1. $ drush uli
  2.  User 1 is disabled. Would you like to:
     [0] Cancel
     [1] Issue link anyways
     [2] Issue a link for another user
    
  3. $ 2
  4.  Search by:
     [0] UID
     [1] Name
    
  5. $ 1
  6. Enter the username
  7. $ Dave
  8. https://www.example.com/user/login/...
@Chi-teck
Copy link
Collaborator

Makes sense. Blocking User 1 is a common practice. I would just emit an error and return non-zero exit code if the user is blocked.

@weitzman
Copy link
Member

Woops. This was fixed in #4934

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants