Forum: Rails Engines LoginEngine Infinite Loop Problem

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Liang G. (Guest)
on 2006-04-12 09:20

I searched "UserEngine Infinite Loop" thread and it didn't solve my

I installed LoginEngine only, and everytime I try to login, it will
redirect to /user/login.

Here is rail's developement log:
Processing UserController#login (for at 2006-04-12 09:22:28)
  Session ID: 6f7af19de1b302fc18ebfd95293d3d40
  Parameters: {"user"=>{"login"=>"liang", "password"=>""},
"commit"=>"Login", "action"=>"login", "controller"=>"user"}
  User Columns (0.010000)   SHOW FIELDS FROM
  User Load (0.010000)   SELECT * FROM users WHERE
(login = 'liang' AND verified = 1 AND deleted = 0) LIMIT 1
Rendering user/login
Completed in 0.02000 (50 reqs/sec) | Rendering: 0.00000 (0%) | DB:
0.02000 (100%) | 200 OK [http://localhost/user/login]

I can create user via "register for an account" and I saw it in mysql
database, but after creat the user, it will redirect to /user/login as

I think I carefully followed
to install but I am really new to Rails....

Jon L. (Guest)
on 2006-04-12 12:31
(Received via mailing list)

After you create a user you will be redirected to /user/login.
It will require you to actually login.

You don't look like you're actually providing a password when you try to


On 12/04/06, liang gao <removed_email_address@domain.invalid> wrote:
> [POST]
> Posted via
> _______________________________________________
> engine-users mailing list
> removed_email_address@domain.invalid

Liang G. (Guest)
on 2006-04-12 12:56

actually I tried with valid username/password and I still being redirect
back to /user/login.
Jon L. (Guest)
on 2006-04-12 13:05
(Received via mailing list)

I cannot recreate the problem. However, looking at the log messages in
your first message, your password is empty. Check your flash messages
for errors.


On 12/04/06, liang gao <removed_email_address@domain.invalid> wrote:

Liang G. (Guest)
on 2006-04-14 07:07
Now I know what the problem is.

I always get an "loging unsuccessful" even I use the right

I did some debug to see what went wrong, the "login" in UserController
will always return with "nil" and that is why.

I added an "raise" in

     def authenticate(login, pass)
        raise "login is #{login} , and pass is #{pass}"
        u = find(:first, :conditions => ["login = ? AND verified = 1 AND
deleted = 0", login])
        return nil if u.nil?
        find(:first, :conditions => ["login = ? AND salted_password = ?
AND verified = 1", login, AuthenticatedUser.salted_password(u.salt,

But I never see the raise is being called. How should I debug this
This topic is locked and can not be replied to.