From 9fd61820c781a40779b27d7be5019b0ff00bd68b Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Mon, 6 Jul 2015 13:48:07 +0200 Subject: [PATCH] Fixed syntax error. --- app/models/authorization.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/authorization.rb b/app/models/authorization.rb index 4fb63f307..93751c020 100644 --- a/app/models/authorization.rb +++ b/app/models/authorization.rb @@ -79,7 +79,7 @@ class Authorization < ApplicationModel Authorization.create( user: user, uid: hash['uid'], - username: hash['info']['nickname'] || hash['username'], + username: hash['info']['nickname'] || hash['info']['username'] || hash['info']['name'] || hash['info']['email'] || hash['username'], provider: hash['provider'], token: hash['credentials']['token'], secret: hash['credentials']['secret'] @@ -89,7 +89,7 @@ class Authorization < ApplicationModel private def delete_user_cache - user.cache_delete + user.touch end end