Differential D20670 Diff 49297 src/applications/people/xaction/PhabricatorUserApproveTransaction.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/people/xaction/PhabricatorUserApproveTransaction.php
| Show All 13 Lines | final class PhabricatorUserApproveTransaction | ||||
| } | } | ||||
| public function applyInternalEffects($object, $value) { | public function applyInternalEffects($object, $value) { | ||||
| $object->setIsApproved((int)$value); | $object->setIsApproved((int)$value); | ||||
| } | } | ||||
| public function applyExternalEffects($object, $value) { | public function applyExternalEffects($object, $value) { | ||||
| $user = $object; | $user = $object; | ||||
| $this->newUserLog(PhabricatorUserLog::ACTION_APPROVE) | |||||
| ->setOldValue((bool)$user->getIsApproved()) | |||||
| ->setNewValue((bool)$value) | |||||
| ->save(); | |||||
| $actor = $this->getActor(); | $actor = $this->getActor(); | ||||
| $title = pht( | $title = pht( | ||||
| 'Phabricator Account "%s" Approved', | 'Phabricator Account "%s" Approved', | ||||
| $user->getUsername()); | $user->getUsername()); | ||||
| $body = sprintf( | $body = sprintf( | ||||
| "%s\n\n %s\n\n", | "%s\n\n %s\n\n", | ||||
| ▲ Show 20 Lines • Show All 63 Lines • Show Last 20 Lines | |||||