-
Notifications
You must be signed in to change notification settings - Fork 4
Resetting a Password
Dan Kerchner edited this page Dec 16, 2021
·
3 revisions
UPDATE (16 Dec 2021): This has been properly fixed in https://github.com/gwu-libraries/scholarspace-hyrax/pull/311 so users should be able to use the Forgot your password?
link. If it's not working, make sure that production.rb
still contains correct mailer setup.
As a fallback, the legacy workaround is still included below:
At the rails console (see https://github.com/gwu-libraries/scholarspace-hyrax/wiki/How-Tos), get the user object by the user's email:
> u = User.find_by_user_key('[email protected]')
The response should be similar to:
User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."email" = LIMIT [["email", "[email protected]"], ["LIMIT", 1]]
Delete the user
> u.delete
The response should be similar to:
SQL (20.2ms) DELETE FROM "users" WHERE "users"."id" = [["id", 8]]
The user should now use the "Sign Up" link on the login page, but should use THE EXACT SAME EMAIL ADDRESS. The newly created user will own all of the works created under the same email address.