# HG changeset patch # User jittat # Date 2009-05-21 05:52:57 # Node ID 976e2beba418bf2a79d1c4d360c91aa00335c28b # Parent 27e07d862fff8c98f0155162b78ce5fa831746ba MERGED bug fix on user password recovery from ytopc branch (change set 402:403) git-svn-id: http://theory.cpe.ku.ac.th/grader/web/trunk@404 6386c4cd-e34a-4fa8-8920-d93eb39b512e diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -97,6 +97,7 @@ flash[:notice] = 'The account has recently created or new password has recently been requested. Please wait for 5 minutes' else user.password = user.password_confirmation = User.random_password + user.save send_new_password_email(user) flash[:notice] = 'New password has been mailed to you.' end @@ -156,7 +157,7 @@ mail = TMail::Mail.new mail.to = user.email mail.from = Configuration['system.online_registration.from'] - mail.subject = "[#{contest_name}] Confirmation" + mail.subject = "[#{contest_name}] Password recovery" mail.body = t('registration.password_retrieval.email_body', { :full_name => user.full_name, :contest_name => contest_name,