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:
Tom Hughes 2007-06-09 23:08:18 +00:00
parent a187c759b7
commit 457d66eb5b

View file

@ -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 :-)"