Mark user as active when issuing a new password - this allows users who
authorTom Hughes <tom@compton.nu>
Sat, 9 Jun 2007 23:08:18 +0000 (23:08 +0000)
committerTom Hughes <tom@compton.nu>
Sat, 9 Jun 2007 23:08:18 +0000 (23:08 +0000)
forgot to activate their account to do so by going through the lost password
procedure, which effectively revalidates their email address.

app/controllers/user_controller.rb

index f12cb1051dfded38933a49e5fc6d95edc3c2b5ce..9a1d89da6222213eef1c55108adcdd77b27e4807 100644 (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 :-)"