core-bundle/src/Resources/contao/modules/ModuleTwoFactor.php
protected function disableTwoFactor(BackendUser $user, $return)
	{
		// Return if 2FA is disabled already
		if (!$user->useTwoFactor)
		{
			return;
		}

		$user->secret = null;
		$user->useTwoFactor = '';
		$user->save();

		throw new RedirectResponseException($return);
	}
protected function disableTwoFactor(BackendUser $user, $return)
	{
		// Return if 2FA is disabled already
		if (!$user->useTwoFactor)
		{
			return;
		}

		$user->secret = null;
		$user->useTwoFactor = '';
		$user->save();

		throw new RedirectResponseException($return);
	}
Disable two-factor authentication

@param BackendUser $user
@param string      $return