Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14056859
D14913.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D14913.diff
View Options
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
@@ -11,6 +11,8 @@
$viewer = $this->getViewer();
$account_key = $request->getURIData('akey');
+ $invite = $this->loadInvite();
+
if ($request->getUser()->isLoggedIn()) {
return $this->renderError(pht('You are already logged in.'));
}
@@ -25,7 +27,7 @@
$is_default = true;
$is_setup = true;
} else {
- list($account, $provider, $response) = $this->loadDefaultAccount();
+ list($account, $provider, $response) = $this->loadDefaultAccount($invite);
$is_default = true;
}
@@ -33,8 +35,6 @@
return $response;
}
- $invite = $this->loadInvite();
-
if (!$provider->shouldAllowRegistration()) {
if ($invite) {
// If the user has an invite, we allow them to register with any
@@ -532,7 +532,7 @@
));
}
- private function loadDefaultAccount() {
+ private function loadDefaultAccount($invite = false) {
$providers = PhabricatorAuthProvider::getAllEnabledProviders();
$account = null;
$provider = null;
@@ -540,8 +540,10 @@
foreach ($providers as $key => $candidate_provider) {
if (!$candidate_provider->shouldAllowRegistration()) {
- unset($providers[$key]);
- continue;
+ if (!$invite) {
+ unset($providers[$key]);
+ continue;
+ }
}
if (!$candidate_provider->isDefaultRegistrationProvider()) {
unset($providers[$key]);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 17, 10:52 PM (2 d, 18 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6731472
Default Alt Text
D14913.diff (1 KB)
Attached To
Mode
D14913: Fix for e-mail invites not working when auth provider has new user registration disabled
Attached
Detach File
Event Timeline
Log In to Comment