Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15391878
D11877.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
D11877.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
@@ -181,6 +181,13 @@
$e_password = true;
$e_captcha = true;
+ $skip_captcha = false;
+ if ($invite) {
+ // If the user is accepting an invite, assume they're trustworthy enough
+ // that we don't need to CAPTCHA them.
+ $skip_captcha = true;
+ }
+
$min_len = PhabricatorEnv::getEnvConfig('account.minimum-password-length');
$min_len = (int)$min_len;
@@ -193,7 +200,7 @@
if (($request->isFormPost() || !$can_edit_anything) && !$from_invite) {
$unguarded = AphrontWriteGuard::beginScopedUnguardedWrites();
- if ($must_set_password) {
+ if ($must_set_password && !$skip_captcha) {
$e_captcha = pht('Again');
$captcha_ok = AphrontFormRecaptchaControl::processCaptcha($request);
@@ -464,7 +471,7 @@
->setError($e_email));
}
- if ($must_set_password) {
+ if ($must_set_password && !$skip_captcha) {
$form->appendChild(
id(new AphrontFormRecaptchaControl())
->setLabel(pht('Captcha'))
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Mar 16, 12:05 PM (5 d, 18 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7702011
Default Alt Text
D11877.diff (1 KB)
Attached To
Mode
D11877: Skip captcha when redeeming an invite
Attached
Detach File
Event Timeline
Log In to Comment