Permalink
Browse files

Fix add_provider_to_user method bug.

  • Loading branch information...
ppworks committed Jun 16, 2012
1 parent 4606faf commit 5c7c77f4b74f0326783f3ab2eef6bead09b99ec0
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/sorcery/controller/submodules/external.rb
@@ -76,7 +76,7 @@ def add_provider_to_user(provider)
user_hash = provider.get_user_hash
config = user_class.sorcery_config
- user = current_user.send(config.authentications_class.to_s.downcase.pluralize).build(config.provider_uid_attribute_name => user_hash[:uid], config.provider_attribute_name => provider)
+ user = current_user.send(config.authentications_class.to_s.downcase.pluralize).build(config.provider_uid_attribute_name => user_hash[:uid], config.provider_attribute_name => provider_name)
user.save(:validate => false)
return user

0 comments on commit 5c7c77f

Please sign in to comment.