mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/OATHAuth
synced 2024-09-23 18:30:39 +00:00
Fix disabling two-factor authentication
Fixes 97abce5
.
Bug: T354505
Change-Id: Ifde7434a6c02e2f8d9d790834b7f316d4afa205a
This commit is contained in:
parent
7c46714b31
commit
caf64f75ca
|
@ -242,6 +242,11 @@ class OATHUserRepository implements LoggerAwareInterface {
|
|||
->caller( __METHOD__ )
|
||||
->execute();
|
||||
|
||||
// TODO: figure this out from the key itself
|
||||
// After calling ->disable(), getModule() will return null so this
|
||||
// has to be done before.
|
||||
$keyType = $user->getModule()->getName();
|
||||
|
||||
$user->disable();
|
||||
|
||||
$userName = $user->getUser()->getName();
|
||||
|
@ -250,7 +255,7 @@ class OATHUserRepository implements LoggerAwareInterface {
|
|||
$this->logger->info( 'OATHAuth disabled for {user} from {clientip}', [
|
||||
'user' => $userName,
|
||||
'clientip' => $clientInfo,
|
||||
'oathtype' => $user->getModule()->getName(),
|
||||
'oathtype' => $keyType,
|
||||
] );
|
||||
|
||||
Manager::notifyDisabled( $user, $self );
|
||||
|
|
Loading…
Reference in a new issue