Differential D20670 Diff 49297 src/applications/people/xaction/PhabricatorUserUsernameTransaction.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/people/xaction/PhabricatorUserUsernameTransaction.php
| Show All 18 Lines | final class PhabricatorUserUsernameTransaction | ||||
| public function applyExternalEffects($object, $value) { | public function applyExternalEffects($object, $value) { | ||||
| $actor = $this->getActor(); | $actor = $this->getActor(); | ||||
| $user = $object; | $user = $object; | ||||
| $old_username = $this->getOldValue(); | $old_username = $this->getOldValue(); | ||||
| $new_username = $this->getNewValue(); | $new_username = $this->getNewValue(); | ||||
| $this->newUserLog(PhabricatorUserLog::ACTION_CHANGE_USERNAME) | |||||
| ->setOldValue($old_username) | |||||
| ->setNewValue($new_username) | |||||
| ->save(); | |||||
| // The SSH key cache currently includes usernames, so dirty it. See T12554 | // The SSH key cache currently includes usernames, so dirty it. See T12554 | ||||
| // for discussion. | // for discussion. | ||||
| PhabricatorAuthSSHKeyQuery::deleteSSHKeyCache(); | PhabricatorAuthSSHKeyQuery::deleteSSHKeyCache(); | ||||
| id(new PhabricatorPeopleUsernameMailEngine()) | id(new PhabricatorPeopleUsernameMailEngine()) | ||||
| ->setSender($actor) | ->setSender($actor) | ||||
| ->setRecipient($object) | ->setRecipient($object) | ||||
| ->setOldUsername($old_username) | ->setOldUsername($old_username) | ||||
| ▲ Show 20 Lines • Show All 78 Lines • Show Last 20 Lines | |||||