]> BookStack Code Mirror - bookstack/blobdiff - app/Http/Controllers/UserController.php
Added MFA setup link on user edit view
[bookstack] / app / Http / Controllers / UserController.php
index f7b2afef8d2e97d37db5ab1a7bea33bd002a0887..7f42e94ccbff1557e058563d822cafc7c4559585 100644 (file)
@@ -128,12 +128,14 @@ class UserController extends Controller
         $authMethod = ($user->system_name) ? 'system' : config('auth.method');
 
         $activeSocialDrivers = $socialAuthService->getActiveDrivers();
+        $mfaMethods = user()->mfaValues()->get(['id', 'method'])->groupBy('method');
         $this->setPageTitle(trans('settings.user_profile'));
         $roles = $this->userRepo->getAllRoles();
 
         return view('users.edit', [
             'user'                => $user,
             'activeSocialDrivers' => $activeSocialDrivers,
+            'mfaMethods'          => $mfaMethods,
             'authMethod'          => $authMethod,
             'roles'               => $roles,
         ]);