public function edit($userId) { //Verify the user can access this user record $user = User::findWithPermission($userId); $profileData = $this->profileRepo->getUserProfile($userId); $skills = $this->profileSkillsRepository->getSelectArray(); return \View::make('account.profile.edit')->with('profileData', $profileData)->with('userId', $userId)->with('skills', $skills)->with('user', $user); }
public function show($id) { $user = User::findOrFail($id); if (\Auth::guest() && $user->profile_private) { return \Response::make('', 404); } $profileData = $this->profileRepo->getUserProfile($id); $userSkills = array_intersect_ukey($this->profileSkillsRepository->getAll(), array_flip($profileData->skills), [$this, 'key_compare_func']); return \View::make('members.show')->with('user', $user)->with('profileData', $profileData)->with('userSkills', $userSkills); }