phacility/phabricator · error · Exception

Verified email addresses can not be reassigned.

Error message

Verified email addresses can not be reassigned.

What it means

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.

Solutions

  1. Remove the address from the original account explicitly before assigning it to the new one.
  2. Use a fresh, unclaimed address for the new account instead of reassigning a verified one.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/applications/people/editor/PhabricatorUserEditor.php:424 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21). Data as JSON: /api/errors/af6dd4ad30967da3. Report an issue: GitHub.

Appendix: source

Thrown at src/applications/people/editor/PhabricatorUserEditor.php:424

    if (!$user->getID()) {
      throw new Exception(pht('User has not been created yet!'));
    }

    if (!$email->getID()) {
      throw new Exception(pht('Email has not been created yet!'));
    }

    $user->openTransaction();
      $user->beginWriteLocking();

        $user->reload();
        $email->reload();

        $old_user = $email->getUserPHID();

        if ($old_user != $user->getPHID()) {
          if ($email->getIsVerified()) {
            throw new Exception(
              pht('Verified email addresses can not be reassigned.'));
          }
          if ($email->getIsPrimary()) {
            throw new Exception(
              pht('Primary email addresses can not be reassigned.'));
          }

          $email->setUserPHID($user->getPHID());
          $email->save();

          $log = PhabricatorUserLog::initializeNewLog(
            $actor,
            $user->getPHID(),
            PhabricatorReassignEmailUserLogType::LOGTYPE);
          $log->setNewValue($email->getAddress());
          $log->save();
        }

View on GitHub (pinned to 5720a38cfe)