facebookpublish,themen fixes

This commit is contained in:
2014-06-20 00:15:45 +05:30
parent 61510a8891
commit 2df0d89b61
16 changed files with 158 additions and 37 deletions

View File

@@ -38,16 +38,17 @@ belongs_to :fetprofile
def self.find_for_facebook_oauth(auth, signed_in_resource=nil)
logger.debug auth.to_s
logger.debug "DDD Username= #{auth.username}"
user = User.where(:provider => auth.provider, :uid => auth.extra.raw_info.uid).first
user = User.where(:provider => auth.provider, :uid => auth.uid).first
unless user
user = User.create(name:auth.uid,
user = User.create(name: auth.uid,
provider:auth.provider,
uid:auth.uid,
uid: auth.uid,
email:auth.info.email,
password:Devise.friendly_token[0,20]
)
end
user
end
def self.find_for_ldap_oauth(auth,signed_in_resource=nil)