Call OATHAuthUser::disable() in UserRepository::remove()

Ensures that the database and the user object will stay in sync.

Change-Id: I36ed361594e24dfdb96e23fc5b04fa342ece6df5
This commit is contained in:
Taavi Väänänen 2023-12-25 13:19:58 +02:00
parent 0d35e253bf
commit 97abce5e90
No known key found for this signature in database
GPG key ID: EF242F709F912FBE
2 changed files with 2 additions and 1 deletions

View file

@ -243,6 +243,8 @@ class OATHUserRepository implements LoggerAwareInterface {
->caller( __METHOD__ )
->execute();
$user->disable();
$userName = $user->getUser()->getName();
$this->cache->delete( $userName );

View file

@ -141,7 +141,6 @@ class DisableOATHForUser extends FormSpecialPage {
}
$this->userRepo->remove( $oathUser, $this->getRequest()->getIP(), false );
$oathUser->disable();
// message used: logentry-oath-disable-other
$logEntry = new ManualLogEntry( 'oath', 'disable-other' );