#131 ✓moved_to_github
Tommaso Passi

restful_authentication transition using email instead of login

Reported by Tommaso Passi | June 24th, 2009 @ 09:57 AM

Hi,

I've read the tutorial for restful_authentication migration on your blog and put this method on my User model:

acts_as_authentic do |c|
  c.transition_from_restful_authentication = true
end
but I've used the email instead of login in my previous project using restful_authentication and Authlogic seems to use the login for authenticate the user using transition_from_restful_authentication, so when I pass email (not login) and password to authenticate the user, I have a password not valid error.

Thanks.

--Tommaso

Comments and changes to this ticket

  • Ben Johnson

    Ben Johnson June 28th, 2009 @ 02:39 AM

    • State changed from “new” to “open”

    By default, authlogic automatically uses the login field if it is present. If it's not, it will use the email field. If you want to change this behavior you need to specify this directly. But why even have a login field if you aren't using it?

    Anyways:

    acts_as_authentic do |c|
    c.login_field :email
    end
    

    Hope that helps. I'm not 100% sure if this is what you are asking.

  • Ben Johnson

    Ben Johnson June 28th, 2009 @ 02:40 AM

    Also, try updating authlogic if you haven't. You should be using v2.1.0. There was a change to how that option works in that version.

  • Ben Johnson

    Ben Johnson August 7th, 2009 @ 06:20 PM

    • State changed from “open” to “moved_to_github”

    [state:"moved_to_github" bulk edit command]

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Object based authentication solution that handles all of the non sense for you. It's as easy as ActiveRecord is with a database.

People watching this ticket

Pages