Page MenuHomePhabricator

D8528.id20234.diff
No OneTemporary

D8528.id20234.diff

diff --git a/src/applications/auth/controller/PhabricatorAuthRegisterController.php b/src/applications/auth/controller/PhabricatorAuthRegisterController.php
--- a/src/applications/auth/controller/PhabricatorAuthRegisterController.php
+++ b/src/applications/auth/controller/PhabricatorAuthRegisterController.php
@@ -57,8 +57,13 @@
$default_username = $account->getUsername();
$default_realname = $account->getRealName();
+
$default_email = $account->getEmail();
- if ($default_email) {
+ if (!PhabricatorUserEmail::isValidAddress($default_email)) {
+ $default_email = null;
+ }
+
+ if ($default_email !== null) {
// If the account source provided an email, but it's not allowed by
// the configuration, roadblock the user. Previously, we let the user
// pick a valid email address instead, but this does not align well with
@@ -84,7 +89,7 @@
// TODO: See T3340.
// TODO: See T3472.
- if ($default_email) {
+ if ($default_email !== null) {
$same_email = id(new PhabricatorUserEmail())->loadOneWhere(
'address = %s',
$default_email);

File Metadata

Mime Type
text/plain
Expires
Mon, Mar 31, 7:13 AM (3 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7704611
Default Alt Text
D8528.id20234.diff (1 KB)

Event Timeline