Пример #1
0
 public function update($userId, UpdateUserRequest $request, AppMailer $mailer)
 {
     // Get the user
     $userNode = $this->users->getById($userId);
     if (!empty($userNode)) {
         $person = new Person();
         $person->setNode($userNode);
         $person->update($request->input());
         if ($request->input('verified', false)) {
             // Send an email to the user that his email has been confirmed
             $mailer->sendRegistrationConfirmation($person);
         }
         return response()->json(['message' => 'De gebruiker werd bijgewerkt.']);
     }
     abort(404);
 }