Esempio n. 1
0
 /**
  * @param null $action
  *
  * @return array|\Illuminate\Contracts\View\Factory|\Illuminate\View\View|mixed
  */
 public function register($action = null)
 {
     switch ($action) {
         case 'info':
             return $this->widgetInformation();
         default:
             return $this->output('users.widgets.countusers', ['nb_users' => $this->r_user->count()]);
     }
 }
Esempio n. 2
0
 /**
  * @param null $action
  *
  * @return array|\Illuminate\Contracts\View\Factory|\Illuminate\View\View|mixed
  */
 public function register($action = null)
 {
     switch ($action) {
         case 'info':
             return $this->widgetInformation();
         default:
             $user = $this->r_user->find(Auth::user()->id);
             return $this->output('users.widgets.profileusers', ['user' => $user]);
     }
 }
 /**
  * Handle a registration request for the application from providers.
  *
  * @param Request $request
  * @param         $provider
  *
  * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
  */
 public function postRegisterFromProvider(Request $request, $provider)
 {
     $validator = $this->r_users->validateNewUser($request->all());
     if ($validator->fails()) {
         $this->throwValidationException($request, $validator);
     }
     return $this->r_users->postRegisterFromProviderWithRedirect($request, $provider, $this->guard(), $this->redirectPath());
 }
 /**
  * $> curl --header "X-Authorization: <API_KEY>"
  * http://localhost/api/v1/users/<ID>
  *
  * @route api/v1/users
  * @type GET
  *
  * @param $id
  *
  * @return mixed
  */
 public function show($id)
 {
     $users = [];
     try {
         if (Auth::user()->hasRole('admin')) {
             $users = $this->r_users->find($id);
         }
         return $this->response->withItem($users, new $this->obj_userTransformer());
     } catch (ModelNotFoundException $e) {
         return $this->response->errorNotFound();
     }
 }
 /**
  * Users backend dashboard.
  *
  * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
  */
 public function index()
 {
     return $this->r_users->indexUsersBackendDashboard();
 }
 /**
  * Display the password reset view for the given token.
  *
  * If no token is present, display the link request form.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  string|null  $token
  * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
  */
 public function showResetForm(Request $request, $token = null)
 {
     return $this->r_users->emailToResetPassword($token);
 }
 /**
  * @param UserPasswordFormRequest $request
  *
  * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View|void
  */
 public function updateMyPassword(UserPasswordFormRequest $request)
 {
     return $this->r_users->updateUserPasswordFrontEnd($request);
 }
 /**
  * Display the form to request a password reset link.
  *
  * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
  */
 public function showLinkRequestForm()
 {
     return $this->r_users->formToResetPassword();
 }
 /**
  * @param $id
  *
  * @return mixed
  */
 public function resetpassword($id)
 {
     return $this->r_users->resetPasswordUserBackEnd($id);
 }
Esempio n. 10
0
 /**
  * Once user authenticated on site.
  *
  * @param \Illuminate\Http\Request $request
  * @param User                     $user
  *
  * @return \Illuminate\Http\RedirectResponse
  */
 public function authenticated(Request $request, User $user)
 {
     return $this->r_users->redirectAfterAuthentication($request, $user, $this->redirectPath());
 }
Esempio n. 11
0
 /**
  * Obtain the user information from a provider.
  *
  * @param $provider
  *
  * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
  */
 public function handleProviderCallback($provider)
 {
     return $this->r_users->handleProviderCallbackForAuthentificationWithRedirect($provider, $this->redirectPath());
 }
 /**
  * Reset the given user's password.
  *
  * @param  \Illuminate\Contracts\Auth\CanResetPassword  $user
  * @param  string  $password
  * @return void
  */
 protected function resetPassword($user, $password)
 {
     $this->r_users->resetUserPassword($user, $password, $this->getGuard());
 }
 /**
  * @param UpdateUsersSettingsFormRequest $request
  *
  * @return mixed
  */
 public function store(UpdateUsersSettingsFormRequest $request)
 {
     return $this->r_users->storeBackEndSettings($request);
 }