Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/phabricator
Path: blob/master/src/applications/auth/xaction/PhabricatorAuthFactorProviderDuoUsernamesTransaction.php
12256 views
1
<?php
2
3
final class PhabricatorAuthFactorProviderDuoUsernamesTransaction
4
extends PhabricatorAuthFactorProviderTransactionType {
5
6
const TRANSACTIONTYPE = 'duo.usernames';
7
8
public function generateOldValue($object) {
9
$key = PhabricatorDuoAuthFactor::PROP_USERNAMES;
10
return $object->getAuthFactorProviderProperty($key);
11
}
12
13
public function applyInternalEffects($object, $value) {
14
$key = PhabricatorDuoAuthFactor::PROP_USERNAMES;
15
$object->setAuthFactorProviderProperty($key, $value);
16
}
17
18
public function getTitle() {
19
return pht(
20
'%s changed the username policy for this provider from %s to %s.',
21
$this->renderAuthor(),
22
$this->renderOldValue(),
23
$this->renderNewValue());
24
}
25
26
}
27
28