Differential D16541 Diff 39826 src/applications/auth/controller/PhabricatorAuthRegisterController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/auth/controller/PhabricatorAuthRegisterController.php
Show First 20 Lines • Show All 83 Lines • ▼ Show 20 Lines | public function handleRequest(AphrontRequest $request) { | ||||
if ($default_email !== null) { | if ($default_email !== null) { | ||||
// If the account source provided an email, but it's not allowed by | // If the account source provided an email, but it's not allowed by | ||||
// the configuration, roadblock the user. Previously, we let the user | // the configuration, roadblock the user. Previously, we let the user | ||||
// pick a valid email address instead, but this does not align well with | // pick a valid email address instead, but this does not align well with | ||||
// user expectation and it's not clear the cases it enables are valuable. | // user expectation and it's not clear the cases it enables are valuable. | ||||
// See discussion in T3472. | // See discussion in T3472. | ||||
if (!PhabricatorUserEmail::isAllowedAddress($default_email)) { | if (!PhabricatorUserEmail::isAllowedAddress($default_email)) { | ||||
$debug_email = new PHUIInvisibleCharacterView($default_email); | |||||
return $this->renderError( | return $this->renderError( | ||||
array( | array( | ||||
pht( | pht( | ||||
'The account you are attempting to register with has an invalid '. | 'The account you are attempting to register with has an invalid '. | ||||
'email address (%s). This Phabricator install only allows '. | 'email address (%s). This Phabricator install only allows '. | ||||
'registration with specific email addresses:', | 'registration with specific email addresses:', | ||||
$default_email), | $debug_email), | ||||
phutil_tag('br'), | phutil_tag('br'), | ||||
phutil_tag('br'), | phutil_tag('br'), | ||||
PhabricatorUserEmail::describeAllowedAddresses(), | PhabricatorUserEmail::describeAllowedAddresses(), | ||||
)); | )); | ||||
} | } | ||||
// If the account source provided an email, but another account already | // If the account source provided an email, but another account already | ||||
// has that email, just pretend we didn't get an email. | // has that email, just pretend we didn't get an email. | ||||
▲ Show 20 Lines • Show All 550 Lines • Show Last 20 Lines |