Big feactoring and bug fixing, Mailer, Tasks, GroupOrders

This commit is contained in:
benni 2012-08-24 11:11:40 +02:00
parent c936813967
commit 5fb0bc2444
43 changed files with 95 additions and 118 deletions

View file

@ -5,11 +5,12 @@ class LoginController < ApplicationController
# Display the form to enter an email address requesting a token to set a new password.
def forgot_password
@user = User.new
end
# Sends an email to a user with the token that allows setting a new password through action "password".
def reset_password
if (user = User.find_by_email(params[:login][:email]))
if (user = User.find_by_email(params[:user][:email]))
user.reset_password_token = user.new_random_password(16)
user.reset_password_expires = Time.now.advance(:days => 2)
if user.save