Exemplo n.º 1
0
 /**
  * @return mixed
  */
 private function getCurrentUserId()
 {
     if (!$this->current_user_id) {
         $this->current_user_id = $this->users->currentUser()->id;
     }
     return $this->current_user_id;
 }
 /**
  * @return mixed
  */
 public function postEditProfile()
 {
     if (Input::has('cancel')) {
         return Redirect::to(Coanda::adminUrl('users/profile'));
     }
     $user = $this->manager->currentUser();
     try {
         $this->manager->updateExistingUser($user->id, Input::all());
         return Redirect::to(Coanda::adminUrl('users/profile'))->with('updated', true);
     } catch (ValidationException $exception) {
         return Redirect::to(Coanda::adminUrl('users/edit-profile'))->with('error', true)->with('invalid_fields', $exception->getInvalidFields())->withInput();
     }
 }