From: Tim Düsterhus Date: Wed, 30 Jun 2021 10:57:11 +0000 (+0200) Subject: Handle Facebook not providing an email address X-Git-Tag: 5.4.0_RC_1~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b1b31d7992934f29fa3eaf3f1f84090390d72577;p=GitHub%2FWoltLab%2FWCF.git Handle Facebook not providing an email address Fixes #4241 --- diff --git a/wcfsetup/install/files/lib/action/FacebookAuthAction.class.php b/wcfsetup/install/files/lib/action/FacebookAuthAction.class.php index 901a855584..c5276b3846 100644 --- a/wcfsetup/install/files/lib/action/FacebookAuthAction.class.php +++ b/wcfsetup/install/files/lib/action/FacebookAuthAction.class.php @@ -106,7 +106,9 @@ final class FacebookAuthAction extends AbstractOauth2Action $parsed['__id'] = $parsed['id']; $parsed['__username'] = $parsed['name']; - $parsed['__email'] = $parsed['email']; + if (!empty($parsed['email'])) { + $parsed['__email'] = $parsed['email']; + } $parsed['accessToken'] = $accessToken; return new OauthUser($parsed);