mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/OATHAuth
synced 2024-11-27 17:50:15 +00:00
notifications: Store number of keys in notification data
We want to customize the message depending on the number of active devices, for example "an authentication device was removed" vs "two-factor has been disabled". Bug: T353962 Change-Id: Iaeb119a7cc6c264c4e49edeb3a88453786547021
This commit is contained in:
parent
97abce5e90
commit
095f91815b
|
@ -55,6 +55,7 @@ class Manager {
|
|||
'agent' => $oUser->getUser(),
|
||||
'extra' => [
|
||||
'self' => $self,
|
||||
'activeDevices' => count( $oUser->getKeys() ),
|
||||
]
|
||||
] );
|
||||
}
|
||||
|
@ -71,7 +72,10 @@ class Manager {
|
|||
Event::create( [
|
||||
'type' => 'oathauth-enable',
|
||||
'title' => SpecialPage::getTitleFor( 'Preferences' ),
|
||||
'agent' => $oUser->getUser()
|
||||
'agent' => $oUser->getUser(),
|
||||
'extra' => [
|
||||
'activeDevices' => count( $oUser->getKeys() ),
|
||||
],
|
||||
] );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -253,6 +253,7 @@ class OATHUserRepository implements LoggerAwareInterface {
|
|||
'clientip' => $clientInfo,
|
||||
'oathtype' => $user->getModule()->getName(),
|
||||
] );
|
||||
|
||||
Manager::notifyDisabled( $user, $self );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue