コード例 #1
0
ファイル: UserController.php プロジェクト: crono/BookStack
 /**
  * Show the form for editing the specified user.
  * @param  int              $id
  * @param SocialAuthService $socialAuthService
  * @return Response
  */
 public function edit($id, SocialAuthService $socialAuthService)
 {
     $this->checkPermissionOr('user-update', function () use($id) {
         return $this->currentUser->id == $id;
     });
     $user = $this->user->findOrFail($id);
     $activeSocialDrivers = $socialAuthService->getActiveDrivers();
     $this->setPageTitle('User Profile');
     return view('users/edit', ['user' => $user, 'activeSocialDrivers' => $activeSocialDrivers]);
 }
コード例 #2
0
ファイル: UserController.php プロジェクト: nwalke/BookStack
 /**
  * Show the form for editing the specified user.
  * @param  int              $id
  * @param SocialAuthService $socialAuthService
  * @return Response
  */
 public function edit($id, SocialAuthService $socialAuthService)
 {
     $this->checkPermissionOr('users-manage', function () use($id) {
         return $this->currentUser->id == $id;
     });
     $authMethod = config('auth.method');
     $user = $this->user->findOrFail($id);
     $activeSocialDrivers = $socialAuthService->getActiveDrivers();
     $this->setPageTitle('User Profile');
     $roles = $this->userRepo->getAssignableRoles();
     return view('users/edit', ['user' => $user, 'activeSocialDrivers' => $activeSocialDrivers, 'authMethod' => $authMethod, 'roles' => $roles]);
 }