'Which username should we disable MFA for?', ]; } /** * Execute the console command. */ public function handle() { $user = User::whereUsername($this->argument('username'))->first(); if(!$user) { $this->error('Could not find any user with that username'); exit; } if(!$user->mfa_enabled) { $this->info('User did not have MFA enabled!'); return; } $user->mfa_enabled = false; $user->mfa_secret = null; $user->mfa_backup_codes = null; $user->save(); $this->info('Successfully disabled MFA on this account!'); } }