I just installed this and for the most part it works great, and all in
about 1/2 an hour! Nice. But I have just one small problem. I would
have expected an error message if login fails, but it just stays on
the login page. I tried adding an "else" to the login method of the
AccountController, but the flash message doesn't show up. I'm missing
something obvious here probably..
def login
return unless request.post?
self.current_user = User.authenticate(params[:login],
params[:password])
if logged_in?
if params[:remember_me] == "1"
self.current_user.remember_me
cookies[:auth_token] = { :value =>
self.current_user.remember_token , :expires =>
self.current_user.remember_token_expires_at }
end
redirect_back_or_default(:controller => '/account', :action =>
'index')
flash[:notice] = "Logged in successfully"
else #my added code
flash[:warning] = 'Login failed' #my added code
end #my added code
end