// Ignore warnings about master connections/writes...hard to avoid here
$trxProfiler = \Profiler::instance()->getTransactionProfiler();
- $trxProfiler->setSilenced( true );
+ $old = $trxProfiler->setSilenced( true );
try {
$status = $user->addToDatabase();
if ( !$status->isOK() ) {
return $status;
}
} catch ( \Exception $ex ) {
- $trxProfiler->setSilenced( false );
+ $trxProfiler->setSilenced( $old );
$this->logger->error( __METHOD__ . ': {username} failed with exception {exception}', [
'username' => $username,
'exception' => $ex,
$logEntry->insert();
}
- $trxProfiler->setSilenced( false );
+ $trxProfiler->setSilenced( $old );
if ( $login ) {
$this->setSessionDataForUser( $user );
$session->set( 'AuthManager:lastAuthTimestamp', time() );
$session->persist();
- \ScopedCallback::consume( $delay );
+ \Wikimedia\ScopedCallback::consume( $delay );
\Hooks::run( 'UserLoggedIn', [ $user ] );
}