Changeset View
Changeset View
Standalone View
Standalone View
scripts/user/account_admin.php
Show First 20 Lines • Show All 194 Lines • ▼ Show 20 Lines | $user->openTransaction(); | ||||
} else { | } else { | ||||
if ($verify_email) { | if ($verify_email) { | ||||
$user->setIsEmailVerified(1); | $user->setIsEmailVerified(1); | ||||
$verify_email->setIsVerified($set_verified ? 1 : 0); | $verify_email->setIsVerified($set_verified ? 1 : 0); | ||||
} | } | ||||
$editor->updateUser($user, $verify_email); | $editor->updateUser($user, $verify_email); | ||||
} | } | ||||
$editor->makeSystemAgentUser($user, $set_system_agent); | |||||
$xactions = array(); | $xactions = array(); | ||||
$xactions[] = id(new PhabricatorUserTransaction()) | $xactions[] = id(new PhabricatorUserTransaction()) | ||||
->setTransactionType( | ->setTransactionType( | ||||
PhabricatorUserEmpowerTransaction::TRANSACTIONTYPE) | PhabricatorUserEmpowerTransaction::TRANSACTIONTYPE) | ||||
->setNewValue($set_admin); | ->setNewValue($set_admin); | ||||
$xactions[] = id(new PhabricatorUserTransaction()) | |||||
->setTransactionType( | |||||
PhabricatorUserSystemAgentTransaction::TRANSACTIONTYPE) | |||||
->setNewValue($set_system_agent); | |||||
$actor = PhabricatorUser::getOmnipotentUser(); | $actor = PhabricatorUser::getOmnipotentUser(); | ||||
$content_source = PhabricatorContentSource::newForSource( | $content_source = PhabricatorContentSource::newForSource( | ||||
PhabricatorConsoleContentSource::SOURCECONST); | PhabricatorConsoleContentSource::SOURCECONST); | ||||
$people_application_phid = id(new PhabricatorPeopleApplication())->getPHID(); | $people_application_phid = id(new PhabricatorPeopleApplication())->getPHID(); | ||||
$transaction_editor = id(new PhabricatorUserTransactionEditor()) | $transaction_editor = id(new PhabricatorUserTransactionEditor()) | ||||
->setActor($actor) | ->setActor($actor) | ||||
Show All 10 Lines |