Error trying to validate the session #8

Closed
paraseba opened this Issue Dec 2, 2009 · 2 comments

Projects

None yet

4 participants

@paraseba
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

in:

/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
Contributor
szajbus commented Dec 3, 2009

Check out the commit in my fork http://github.com/szajbus/authlogic_facebook_connect/commit/056be92153730bea60e7270b80d65d4a0ade1320

It seems to deal with the problem.

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

@sjain
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