Update email and name from oauth providers only if empty
This commit is contained in:
@@ -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'],
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user