{"record":{"id":"af6dd4ad30967da3","repo":"phacility/phabricator","slug":"verified-email-addresses-can-not-be-reassigned","errorCode":null,"errorMessage":"Verified email addresses can not be reassigned.","messagePattern":"Verified email addresses can not be reassigned\\.","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/applications/people/editor/PhabricatorUserEditor.php","lineNumber":424,"sourceCode":"    if (!$user->getID()) {\n      throw new Exception(pht('User has not been created yet!'));\n    }\n\n    if (!$email->getID()) {\n      throw new Exception(pht('Email has not been created yet!'));\n    }\n\n    $user->openTransaction();\n      $user->beginWriteLocking();\n\n        $user->reload();\n        $email->reload();\n\n        $old_user = $email->getUserPHID();\n\n        if ($old_user != $user->getPHID()) {\n          if ($email->getIsVerified()) {\n            throw new Exception(\n              pht('Verified email addresses can not be reassigned.'));\n          }\n          if ($email->getIsPrimary()) {\n            throw new Exception(\n              pht('Primary email addresses can not be reassigned.'));\n          }\n\n          $email->setUserPHID($user->getPHID());\n          $email->save();\n\n          $log = PhabricatorUserLog::initializeNewLog(\n            $actor,\n            $user->getPHID(),\n            PhabricatorReassignEmailUserLogType::LOGTYPE);\n          $log->setNewValue($email->getAddress());\n          $log->save();\n        }\n","sourceCodeStart":406,"sourceCodeEnd":442,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/people/editor/PhabricatorUserEditor.php#L406-L442","documentation":"Reassignment guard in PhabricatorUserEditor::reassignEmail: the email currently belongs to a different user and is verified; verified addresses are never silently moved between accounts because ownership was already proven.","triggerScenarios":"Thrown at src/applications/people/editor/PhabricatorUserEditor.php:424 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove the address from the original account explicitly before assigning it to the new one.","Use a fresh, unclaimed address for the new account instead of reassigning a verified one."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","contentChangedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}