Module: Sorcery::Model::Submodules::External::ClassMethods
- Defined in:
- lib/sorcery/model/submodules/external.rb
Instance Method Summary collapse
-
#load_from_provider(provider, uid) ⇒ Object
takes a provider and uid and finds a user by them.
Instance Method Details
#load_from_provider(provider, uid) ⇒ Object
takes a provider and uid and finds a user by them.
42 43 44 45 46 |
# File 'lib/sorcery/model/submodules/external.rb', line 42 def load_from_provider(provider,uid) config = sorcery_config authentication = config.authentications_class.find_by_provider_and_uid(provider, uid) user = find(authentication.send(config.authentications_user_id_attribute_name)) if authentication end |