Mark user as active when issuing a new password - this allows users who
forgot to activate their account to do so by going through the lost password procedure, which effectively revalidates their email address.
This commit is contained in:
parent
a187c759b7
commit
457d66eb5b
1 changed files with 1 additions and 0 deletions
|
@ -75,6 +75,7 @@ class UserController < ApplicationController
|
|||
pass = User.make_token(8)
|
||||
user.pass_crypt = pass
|
||||
user.pass_crypt_confirmation = pass
|
||||
user.active = true
|
||||
user.save
|
||||
Notifier::deliver_reset_password(user, pass)
|
||||
flash[:notice] = "Your password has been changed and is on its way to your mailbox :-)"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue