@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Slightly improve behavior for unverified + unapproved users

Summary: Ref T4140. Allow unapproved users to verify their email addresses. Currently, unapproved blocks email verification, but should not.

Test Plan: Clicked email verification link as an unapproved user, got email verified.

Reviewers: btrahan, chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T4140

Differential Revision: https://secure.phabricator.com/D7618

+16
+4
src/applications/auth/controller/PhabricatorAuthNeedsApprovalController.php
··· 11 11 return false; 12 12 } 13 13 14 + public function shouldRequireEnabledUser() { 15 + return false; 16 + } 17 + 14 18 public function processRequest() { 15 19 $request = $this->getRequest(); 16 20 $user = $request->getUser();
+12
src/applications/auth/controller/PhabricatorEmailVerificationController.php
··· 15 15 return false; 16 16 } 17 17 18 + public function shouldRequireEnabledUser() { 19 + // Unapproved users are allowed to verify their email addresses. We'll kick 20 + // disabled users out later. 21 + return false; 22 + } 23 + 18 24 public function processRequest() { 19 25 $request = $this->getRequest(); 20 26 $user = $request->getUser(); 27 + 28 + if ($user->getIsDisabled()) { 29 + // We allowed unapproved and disabled users to hit this controller, but 30 + // want to kick out disabled users now. 31 + return new Aphront400Response(); 32 + } 21 33 22 34 $email = id(new PhabricatorUserEmail())->loadOneWhere( 23 35 'userPHID = %s AND verificationCode = %s',