From 062997e6ef3efe4a675250630029b162799c6144 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sun, 23 Aug 2015 13:24:40 -0400 Subject: Update email and name from oauth providers only if empty --- app/Auth/Github.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/Auth/Github.php') diff --git a/app/Auth/Github.php b/app/Auth/Github.php index 021ea77d..2d1b7b26 100644 --- a/app/Auth/Github.php +++ b/app/Auth/Github.php @@ -76,8 +76,8 @@ class Github extends Base return $this->user->update(array( 'id' => $user_id, 'github_id' => $profile['id'], - 'email' => $profile['email'] ?: $user['email'], - 'name' => $profile['name'] ?: $user['name'], + 'email' => empty($user['email']) ? $profile['email'] : $user['email'], + 'name' => empty($user['name']) ? $profile['name'] : $user['name'], )); } -- cgit v1.2.3