1
0
mirror of https://github.com/danbee/my-images synced 2025-03-04 08:49:05 +00:00

OAuth is definitely working this time... ;)

This commit is contained in:
Dan Barber 2014-03-24 17:13:36 +00:00
parent dcf1a7999f
commit 2911dee281

View File

@ -2,7 +2,7 @@ class User < ActiveRecord::Base
def self.find_or_create_from_auth(auth)
user = User.find_by(provider: auth.provider, uid: auth.uid)
if user.blank?
User.create(provider: auth.provider,
user = User.create(provider: auth.provider,
uid: auth.uid,
username: auth.info.nickname,
name: auth.info.name)