mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-29 19:25:57 +00:00
confirm token in 2fa challenge
This commit is contained in:
@@ -36,8 +36,9 @@ class UserResource extends JsonResource
|
||||
'avatar' => $this->settings->avatar,
|
||||
'email' => is_demo() ? obfuscate_email($this->email) : $this->email,
|
||||
'role' => $this->role,
|
||||
'two_factor_authentication' => (bool) $this->two_factor_secret,
|
||||
'socialite_account' => ! (bool) $this->password,
|
||||
'two_factor_authentication' => (bool)$this->two_factor_secret,
|
||||
'two_factor_confirmed_at' => $this->two_factor_confirmed_at,
|
||||
'socialite_account' => !(bool)$this->password,
|
||||
'storage' => $this->storage,
|
||||
'created_at' => format_date($this->created_at, 'd. M. Y'),
|
||||
'updated_at' => format_date($this->updated_at, 'd. M. Y'),
|
||||
|
||||
@@ -5,6 +5,7 @@ use DB;
|
||||
use Schema;
|
||||
use Storage;
|
||||
use Artisan;
|
||||
use App\Users\Models\User;
|
||||
use Illuminate\Support\Arr;
|
||||
use Illuminate\Http\Request;
|
||||
use Domain\Files\Models\File;
|
||||
@@ -133,4 +134,13 @@ class UpgradeSystemController extends Controller
|
||||
Artisan::call('subscription:synchronize-plans');
|
||||
}
|
||||
}
|
||||
|
||||
private function upgrade_to_2_0_14(): void
|
||||
{
|
||||
($this->upgradeDatabase)();
|
||||
|
||||
User::whereNotNull('two_factor_secret')
|
||||
->cursor()
|
||||
->each(fn ($user) => $user->forceFill(['two_factor_confirmed_at' => now()])->save());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user