Skip to content

Commit

Permalink
[user:*] Update user commands. (#141)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmolivas committed Nov 10, 2017
1 parent 32aa847 commit 3ed9c88
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 28 deletions.
20 changes: 11 additions & 9 deletions translations/user.delete.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,28 @@ description: 'Delete users from the application'
help: 'The <info>user:delete</info> command helps you delete users.'
welcome: 'Welcome to the Drupal user delete'
options:
user-id: 'User id to be deleted'
user: 'User name/id to be deleted'
roles: 'Users with the listed roles to be deleted'
questions:
user-id: 'User id to be deleted (empty to skip)'
user: 'User name/id to be deleted (empty to skip)'
roles: 'Select role(s) associated with users to be deleted'
messages:
user-id: 'User ID'
username: 'Username'
user-deleted: 'User "%s" was deleted successfully'
users-deleted: '"%s" users were deleted successfully'
errors:
invalid-user-id: 'User id "%s" is invalid'
invalid-user: 'User id "%s" is invalid'
invalid-user: 'User name/id "%s" is invalid'
examples:
- description: 'Delete user with the following the id and the user role'
- description: 'Delete user with the id number 2'
execution: |
drupal user:delete \
--user-id="2"
--roles='authenticated'
- description: 'Delete user with the following id'
--user="2"
- description: 'Delete user with the username "jmolivas"'
execution: |
drupal user:delete \
--user-id="3"
--user="jmolivas"
- description: 'Delete users with the role "authenticated"'
execution: |
drupal user:delete \
--role="authenticated"
12 changes: 5 additions & 7 deletions translations/user.login.clear.attempts.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
description: 'Clear failed login attempts for an account.'
help: 'The <info>user:login:clear:attempts</info> command resets the failed login attempts for an account.'
options:
user-id: 'User ID.'
arguments:
user: 'User name/id.'
questions:
uid: 'Enter User ID.'
numeric-uid: 'User id must be an integer.'
invalid-uid: 'User id must be upper than zero.'
user: 'Enter User name/id'
messages:
successful: 'Login attempts were successfully cleared for user id "%s".'
successful: 'Login attempts were successfully cleared for user: "%s".'
errors:
invalid-user: 'Cannot load user entity (Uid: "%s").'
invalid-user: 'Cannot load user entity using: %s".'
no-flood: 'No flood table on the system.'
15 changes: 9 additions & 6 deletions translations/user.login.url.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
description: 'Returns a one-time user login url.'
options:
user-id: 'User ID.'
user: 'User name/id.'
messages:
url: 'One-time login for "%s": "%s"'
url: 'One-time login for "%s"'
questions:
user: 'Enter User name/id'
errors:
invalid-user: 'Cannot load user entity (User ID: "%s").'
invalid-user: 'Cannot load user entity using: %s".'
examples:
- description: 'Get one time login url for user id 1'
execution: |
drupal user:login:url 1
- description: 'Get one time login url for user id 10'
execution: drupal user:login:url 10
- description: 'Get one time login url for username jmolivas'
execution: drupal user:login:url jmolivas
2 changes: 1 addition & 1 deletion translations/user.password.hash.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ errors: null
examples:
- description: 'Get hash of the word "p455w0rd"'
execution: |
drupal user:password:hash p455w0rd
drupal user:password:hash p455w0rd
13 changes: 8 additions & 5 deletions translations/user.password.reset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,22 @@ help: 'The <info>password:reset</info> command helps you to reset password for a
welcome: 'Welcome to the Drupal password reset'
options:
password: 'Password in text format'
user-id: 'User ID'
user: 'User name/id'
questions:
invalid-uid: 'Invalid user id "%s", user id must be an integer'
invalid-user: 'Invalid user name/id "%s", user id must be an integer'
invalid-pass: 'Password can''t be empty'
user: 'Enter User ID'
user: 'Enter User name/id'
password: 'Enter password'
other-password: 'Other password (press <return> to stop adding passwords)'
messages:
reset-successful: 'Password was updated successfully for user id "%s"'
errors:
invalid-user: 'Invalid user id "%s"'
invalid-user: 'Invalid user name/id "%s"'
empty-password: 'Password can not be empty'
examples:
- description: 'Update password specifying the user id and the new password'
execution: |
drupal user:password:reset 2 p455w0rd
drupal user:password:reset 2 p455w0rd
- description: 'Update password specifying the user jmolivas and the new password'
execution: |
drupal user:password:reset jmolivas p455w0rd

0 comments on commit 3ed9c88

Please sign in to comment.