applied TomH patch for lost password site

This commit is contained in:
Damian Sulewski 2007-05-26 20:58:33 +00:00
parent 40c7e0f9aa
commit 461bf3802d
2 changed files with 4 additions and 1 deletions

View file

@ -53,7 +53,7 @@ class UserController < ApplicationController
end
def lost_password
if params[:user][:email]
if params[:user] and params[:user][:email]
user = User.find_by_email(params['user']['email'])
if user
user.token = User.make_token
@ -63,6 +63,8 @@ class UserController < ApplicationController
else
flash[:notice] = "Couldn't find that email address, sorry."
end
else
render :action => 'lost_password'
end
end