summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/Auth/Github.php4
-rw-r--r--app/Auth/Gitlab.php4
-rw-r--r--app/Auth/Google.php4
3 files changed, 6 insertions, 6 deletions
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'],
));
}
diff --git a/app/Auth/Gitlab.php b/app/Auth/Gitlab.php
index 336152a5..d9a985bf 100644
--- a/app/Auth/Gitlab.php
+++ b/app/Auth/Gitlab.php
@@ -76,8 +76,8 @@ class Gitlab extends Base
return $this->user->update(array(
'id' => $user_id,
'gitlab_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'],
));
}
diff --git a/app/Auth/Google.php b/app/Auth/Google.php
index 972dd748..10ecfe8f 100644
--- a/app/Auth/Google.php
+++ b/app/Auth/Google.php
@@ -77,8 +77,8 @@ class Google extends Base
return $this->user->update(array(
'id' => $user_id,
'google_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'],
));
}