Commit 877fd6dd authored by Nick Malcolm's avatar Nick Malcolm Committed by Evan Read

Replace static, weak password

parent 635ce432
...@@ -74,11 +74,13 @@ If you know the username, user ID, or email address, you can use the Rails conso ...@@ -74,11 +74,13 @@ If you know the username, user ID, or email address, you can use the Rails conso
user = User.find_by(email: 'user@example.com') user = User.find_by(email: 'user@example.com')
``` ```
1. Reset the password: 1. Reset the password by setting a value for `user.password` and `user.password_confirmation`. For example, to set a new random
password:
```ruby ```ruby
user.password = 'secret_pass' new_password = ::User.random_password
user.password_confirmation = 'secret_pass' user.password = new_password
user.password_confirmation = new_password
``` ```
1. Optional. Notify the user that an administrator changed their password: 1. Optional. Notify the user that an administrator changed their password:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment