Error when creating UserSession with User object. #154

Open
abelta opened this Issue Jul 14, 2010 · 2 comments

Projects

None yet

2 participants

@abelta

I've recently found an error that I didn't seem to have a couple of weeks ago (using Rails 3 and Authlogic 2.1.5).

First I create a User like so: u = User.create
Notice that I don't give it either a name or password, but this didn't affect the outcome before.

Now I try to create a session:
UserSession.create u, true

but the session can't be created and if I call inspect on it I get the following error:
"<protected>"}>

I've found other posts on the Internet with users having the same problem. What can be causing it?

@abelta

I'm trying creating a session passing a regular user (not one created without name, password and email) and I'm getting the same results.

@vrybas

For now you might replace
UserSession.create u
to
UserSession.create :email => u.email, :password => u.password.
not a big deal.

But that caught me other way. I forgot that my user got active? == false when created. I've set it to true and session is created.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment