{"record":{"id":"ab50b74e31f3ee52","repo":"phacility/phabricator","slug":"email-address-must-be-s","errorCode":null,"errorMessage":"Email address must be @%s","messagePattern":"Email address must be @(.+?)","errorType":"validation","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/applications/people/editor/PhabricatorUserEditor.php","lineNumber":469,"sourceCode":"/* -(  Internals  )---------------------------------------------------------- */\n\n\n  /**\n   * @task internal\n   */\n  private function willAddEmail(PhabricatorUserEmail $email) {\n\n    // Hard check before write to prevent creation of disallowed email\n    // addresses. Normally, the application does checks and raises more\n    // user friendly errors for us, but we omit the courtesy checks on some\n    // pathways like administrative scripts for simplicity.\n\n    if (!PhabricatorUserEmail::isValidAddress($email->getAddress())) {\n      throw new Exception(PhabricatorUserEmail::describeValidAddresses());\n    }\n\n    if (!PhabricatorUserEmail::isAllowedAddress($email->getAddress())) {\n      throw new Exception(PhabricatorUserEmail::describeAllowedAddresses());\n    }\n\n    $application_email = id(new PhabricatorMetaMTAApplicationEmailQuery())\n      ->setViewer(PhabricatorUser::getOmnipotentUser())\n      ->withAddresses(array($email->getAddress()))\n      ->executeOne();\n    if ($application_email) {\n      throw new Exception($application_email->getInUseMessage());\n    }\n  }\n\n  public function revokePasswordResetLinks(PhabricatorUser $user) {\n    // Revoke any outstanding password reset links. If an attacker compromises\n    // an account, changes the email address, and sends themselves a password\n    // reset link, it could otherwise remain live for a short period of time\n    // and allow them to compromise the account again later.\n\n    PhabricatorAuthTemporaryToken::revokeTokens(","sourceCodeStart":451,"sourceCodeEnd":487,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/people/editor/PhabricatorUserEditor.php#L451-L487","documentation":"Error \"Email address must be @%s\" thrown in phacility/phabricator.","triggerScenarios":"Thrown at src/applications/people/editor/PhabricatorUserEditor.php:469 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}