applied TomH patch for lost password site
This commit is contained in:
parent
40c7e0f9aa
commit
461bf3802d
2 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue