Rails, Authlogic without password (registration ok. user_session validation fails)

后端 未结 1 1619
傲寒
傲寒 2021-01-25 13:32

I am trying to skip the password for Users in Authlogic..

Thanks to SO, I found a solution for creating users

 User
 acts_as_authentic do |c|
   c.valida         


        
1条回答
  •  一整个雨季
    2021-01-25 14:26

    Actually found it here:

    Using Authlogic to authenticate with only a username

    Just pass a user object instead of login/password

    UserSession.new(User.find_by_username('Shreyas Satish')) (This works with rails 3 and authlogic 2.1.6)

    Thanks to fantactuka!

    0 讨论(0)
提交回复
热议问题