Remove invalid calls to the Settings facade

This commit is contained in:
Bubka
2023-03-15 16:26:32 +01:00
parent 4d8180a8c1
commit 82717077be
3 changed files with 12 additions and 11 deletions

View File

@ -3,7 +3,6 @@
namespace App\Http\Controllers\Auth;
use App\Extensions\WebauthnCredentialBroker;
use App\Facades\Settings;
use App\Http\Controllers\Controller;
use App\Http\Requests\WebauthnRecoveryRequest;
use Illuminate\Auth\AuthenticationException;
@ -52,7 +51,8 @@ class WebAuthnRecoveryController extends Controller
if ($this->shouldRevokeAllCredentials($request)) {
$user->flushCredentials();
}
Settings::delete('useWebauthnOnly');
$user->preferences['useWebauthnOnly'] = false;
$user->save();
} else {
throw new AuthenticationException();
}