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
|
end
|
||||||
|
|
||||||
def lost_password
|
def lost_password
|
||||||
if params[:user][:email]
|
if params[:user] and params[:user][:email]
|
||||||
user = User.find_by_email(params['user']['email'])
|
user = User.find_by_email(params['user']['email'])
|
||||||
if user
|
if user
|
||||||
user.token = User.make_token
|
user.token = User.make_token
|
||||||
|
@ -63,6 +63,8 @@ class UserController < ApplicationController
|
||||||
else
|
else
|
||||||
flash[:notice] = "Couldn't find that email address, sorry."
|
flash[:notice] = "Couldn't find that email address, sorry."
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
render :action => 'lost_password'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -44,6 +44,7 @@ ActionController::Routing::Routes.draw do |map|
|
||||||
map.connect '/user/save', :controller => 'user', :action => 'save'
|
map.connect '/user/save', :controller => 'user', :action => 'save'
|
||||||
map.connect '/user/confirm', :controller => 'user', :action => 'confirm'
|
map.connect '/user/confirm', :controller => 'user', :action => 'confirm'
|
||||||
map.connect '/user/go_public', :controller => 'user', :action => 'go_public'
|
map.connect '/user/go_public', :controller => 'user', :action => 'go_public'
|
||||||
|
map.connect '/user/reset_password', :controller => 'user', :action => 'reset_password'
|
||||||
map.connect '/index.html', :controller => 'site', :action => 'index'
|
map.connect '/index.html', :controller => 'site', :action => 'index'
|
||||||
map.connect '/edit.html', :controller => 'site', :action => 'edit'
|
map.connect '/edit.html', :controller => 'site', :action => 'edit'
|
||||||
map.connect '/search.html', :controller => 'way_tag', :action => 'search'
|
map.connect '/search.html', :controller => 'way_tag', :action => 'search'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue