Forum: Ruby on Rails Salted Login Generator glitch

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Rob B. (Guest)
on 2006-04-20 20:57
I followed the tutorial here
http://wiki.rubyonrails.com/rails/pages/SaltedLogi...
and didn't have any problems.  Actionmailer is working fine.  When I
sign up I get the email saying "Please click on the following link to
confirm your registration"
When I do i go to the default page with "Welcome. You are now logged
into the system..."
So I thought great, that was easy....

One glitch though.  When I went to sign in with my new id and password I
got the message "Login unsuccessful"  I have double checked I didnt make
a typo and have scanned through the controllers / models etc and can't
see where its going wrong.  Any ideas?
Joe C. (Guest)
on 2006-04-20 21:53
Rob B. wrote:
> I followed the tutorial here
> http://wiki.rubyonrails.com/rails/pages/SaltedLogi...
> and didn't have any problems.  Actionmailer is working fine.  When I
> sign up I get the email saying "Please click on the following link to
> confirm your registration"
> When I do i go to the default page with "Welcome. You are now logged
> into the system..."
> So I thought great, that was easy....
>
> One glitch though.  When I went to sign in with my new id and password I
> got the message "Login unsuccessful"  I have double checked I didnt make
> a typo and have scanned through the controllers / models etc and can't
> see where its going wrong.  Any ideas?

You need to set:
 before_filter :login_required

in the UserController.

This sets a database field which is required for login.  I had the same
problem.
Rob B. (Guest)
on 2006-04-21 00:16
> You need to set:
>  before_filter :login_required
>
> in the UserController.
>
> This sets a database field which is required for login.  I had the same
> problem.

Many thanks, problem solved :)
This topic is locked and can not be replied to.