/** * 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]); }
/** * 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]); }