␉␉return View::make('users.profile')->with('user', $user);␊ |
␉}␊ |
␊ |
␉public function edit($id)␊ |
␉{␊ |
␉␉if( Auth::check() && Auth::user()->id != $id) ␊ |
␉␉{␊ |
␉ return Redirect::to('/');␊ |
␉}else␊ |
␉{␊ |
␉␉$user = User::find($id);␊ |
␉␉$group = UserXrefRole::where('user_id', '=', $id)->get();␊ |
␊ |
␉␉$group_id = (int)$group[0]->role_id;␊ |
␊ |
␉␉return View::make('users.complete')->with('user', $user)->with('group_id', $group_id);␊ |
␉}␊ |
␉}␊ |
␊ |
␉public function update($id)␊ |
␉{␊ |
␉␉if( Auth::check() && Auth::user()->id != $id) ␊ |
␉␉{␊ |
␉ return Redirect::to('/');␊ |
␉}else␊ |
␉{␊ |
␉␉$user = User::find($id);␊ |
␊ |
␉␉\Session::flash('message', 'You have successfully updated your profile.');␊ |
␉␉return Redirect::to('users', array($id));␊ |
␉}␊ |
␉}␊ |
␊ |
␉public function mentors()␊ |
␉{␊ |
␊ |