Error trying to validate the session #8

paraseba opened this Issue Dec 2, 2009 · 2 comments


None yet

4 participants

paraseba commented Dec 2, 2009

Once the user is authenticated using the Connect button, I get this error any time authlogic tries to validate the session:

undefined method `user' for #User:0x7f1b215fc5b0


/vendor/rails/activerecord/lib/active_record/attribute_methods.rb:260:in method_missing' /vendor/plugins/authlogic_facebook_connect/lib/authlogic_facebook_connect/session.rb:80:intry'
/vendor/plugins/authlogic_facebook_connect/lib/authlogic_facebook_connect/session.rb:80:in `validate_by_facebook_connect'

I think the problem is with this line:
self.attempted_record = facebook_user_class.find(:first, :conditions => { facebook_uid_field => facebook_session.user.uid }).try(:"#{klass}".to_s.underscore)

It looks strange, it basically does "User.find(...).user" so it fails.

szajbus commented Dec 3, 2009

Check out the commit in my fork

It seems to deal with the problem.

I already sent a pull request to kalasjocke, but he still has not merged it in.

sjain commented Oct 13, 2010

This seems to be merged into master - this issue should be closed now.

@kalasjocke kalasjocke closed this Oct 19, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment