Update the specified faq in storage.
@param User    $administrator
@param Request $request
@return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
516917
public function update(User $administrator, Request $request)
    {
        $this->validate($request, [
            'firstname' => 'required',
            'lastname'  => 'required',
            'roles'     => 'required|array',
        ]);

        $this->updateEntry($administrator, $request->only([
            'firstname',
            'lastname',
            'cellphone',
            'telephone',
            'born_at'
        ]));

        $administrator->roles()->sync(input('roles'));

        return redirect_to_resource();
    }
796344
public function update(Request $request)
    {
        $post = $this->api('post.fetch', $request->route('post'))->get();

        $this->authorize('edit', $post);

        $post = $this->api('post.update', $request->route('post'))->parameters($request->only('content'))->patch();

        Forum::alert('success', 'posts.updated');

        return redirect(Forum::route('thread.show', $post));
    }
1104154
public function update(User $user, FormRequest $request)
    {
        $data = $request->all();

        $userData = Arr::except($data, ['exit', 'permissions', 'roles', 'password_confirmation']);

        if (!isset($userData['password']) || $userData['password'] === '') {
            $userData = Arr::except($userData, 'password');
        } else {
            $userData['password'] = Hash::make($data['password']);
        }

        $roles = $data['roles'] ?? [];
        $permissions = $data['permissions'] ?? [];
        $user->roles()->sync($roles);
        $user->syncPermissions($permissions);

        $this->repository->update($user->id, $userData);

        return $this->redirect($request, $user);
    }
440774
public function update(Request $request, User $user)
    {
        $this->authorize('update', $user);
        $this->validate($request, [
            'name'     => 'required|max:255',
        ]);

        $user->update([
            'name' => $request->name,
        ]);

        return redirect()->route('laralum::users.index');
    }
458717
public function update(UpdateUserRequest $request, User $user)
    {
        $this->authorize(UsersPolicy::PERMISSION_UPDATE);

        $user->update($request->getValidatedData());
        $user->roles()->sync($request->get('roles'));

        $this->transNotification('updated', ['name' => $user->full_name], $user->toArray());

        return redirect()->route('admin::auth.users.show', [$user->hashed_id]);
    }
109842
public function update(Request $request, $id)
    {
        $this->validate($request, [
			'title' => 'required',
			'content' => 'required'
		]);
        $requestData = $request->all();
        
        $page = Page::findOrFail($id);
        $page->update($requestData);

        return redirect('admin/pages')->with('flash_message', 'Page updated!');
    }
613309
public function editAction(Request $request)
    {
        $user = $this->getUser();
        $form = $this->createForm(
            UserProfileType::class,
            $user,
            [
                'label' => 'user.profile.title',
                'action' => $this->getCurrentUri($request),
                'attr' => [
                    'novalidate' => 'novalidate',
                ],
                'method' => 'post',
            ]
        );

        $form->handleRequest($request);
        if ($form->isSubmitted() && $form->isValid()) {
            $this->get(UserManagerInterface::class)->save($user);

            $this->addFlash('success', 'eavmanager.flash.edit.success');

            return $this->redirectToRoute(
                'eavmanager_user.profile.edit',
                [
                    'id' => $user->getId(),
                ]
            );
        }

        return [
            'form' => $form->createView(),
            'user' => $user,
        ];
    }
658230
public function newAction(Request $request)
    {
        $userManager = $this->get('fos_user.user_manager');

        /** @var User $user */
        $user = $userManager->createUser();

        $form = $this->createForm(UserType::class, $user, ['new' => true]);
        $form->handleRequest($request);

        if ($form->isValid()) {
            $user->setEnabled(true);
            $user->setPlainPassword($form->get('password')->getData());

            $userManager->updateUser($user);

            $this->addFlash('success', 'New user successfully created!');

            return $this->redirectToRoute('campaignchain_core_user');
        }

        return $this->render('CampaignChainCoreBundle:User:new.html.twig',
            array(
                'form' => $form->createView(),
                'page_title' => 'Create New User',
            ));
    }
249130
public function authenticated(Request $request, $user)
    {
        if ($user->is_blocked || ! $user->is_activated) {
            if ($user->is_blocked) {
                $message = 'Your account is currently banned from accessing the site!';
            } else {
                $message = 'Your account is not yet activated!';
            }
            $this->guard()->logout();
            flash()->error($message);

            return redirect()->route('administrator.login')->withErrors($message);
        }

        return redirect()->intended($this->redirectPath);
    }
1128056
public function update(Request $request)
    {
        $output = $this->schemaManager()->update();
        $this->session()->set('dbupdate_result', $output->getResponseStrings());

        return $this->redirectToRoute('dbupdate_result');
    }
713963
public function updateRoles(Request $request, User $user)
    {
        $this->authorize('roles', $user);

        $roles = Role::all();

        foreach ($roles as $role) {
            if (array_key_exists($role->id, $request->all())) {
                $role->addUser($user);
            } else {
                $role->deleteUser($user);
            }
        }

        return redirect()->route('laralum::users.index')->with('success', __('laralum_users::general.user_roles_updated', ['id' => $user->id]));
    }
1080486
public function update(User $user, UpdateUser $request)
    {
        $data = $request->except(['password', 'roles']);
        if ($request->wantsPasswordChange()) {
            $data['password'] = bcrypt($request->getNewPassword());
        }

        try {
            $user->update($data);
            $user->syncRoles($request->roles());

            $flashMessage = __(':name has been updated.', ['name' => $user->name]);
            if ($request->wantsPasswordChange()) {
                $flashMessage .= ' ' . __("The user's password has changed");
            }

            flash()->success($flashMessage);
        } catch (\Exception $e) {
            flash()->error(__('Error: :msg', ['msg' => $e->getMessage()]));

            return redirect()->back();
        }

        return redirect(route('appshell.user.show', $user));
    }
901372
public function save(User $user, Request $request)
    {
        $permissions = $request->get('permissions', []);
        $roles = $request->input('user.roles', []);

        foreach ($permissions as $key => $value) {
            unset($permissions[$key]);
            $permissions[base64_decode($key)] = $value;
        }

        $user
            ->fill($request->get('user'))
            ->replaceRoles($roles)
            ->fill([
                'permissions' => $permissions,
            ])
            ->save();

        Alert::info(__('User was saved'));

        return redirect()->route('platform.systems.users');
    }
329949
public function update(UpdateUserRequest $request)
    {
        $this->dispatch(new UpdateUser($this->auth->user()->id, $request->get('name'), $request->get('email')));
        return redirect()->route('authentication::profile.show');
    }
763116
public function run(Request $request) {
		$prefs = $this->getServiceContainer()->getPreferenceLoader()->getSystemPreferences();
		$auth = $this->getServiceContainer()->getAuthManager();
		$auth->logout();
		return new RedirectResponse($prefs->getAccountUrl());
	}
300182
public function update(Request $request){

        $contents = $this->content->update($request->all());

        alert()->success('Bloc édité');

        return redirect('build/campagne/'.$contents->newsletter_campagne_id.'#componant');
    }
1221526
public function update(Request $request, $id)
    {
        $this->validate($request, ['name' => 'required']);

        $role = Role::findOrFail($id);
        $role->update($request->all());
        $role->permissions()->detach();

        if ($request->has('permissions')) {
            foreach ($request->permissions as $permission_name) {
                $permission = Permission::whereName($permission_name)->first();
                $role->givePermissionTo($permission);
            }
        }

        return redirect('admin/roles')->with('flash_message', 'Role updated!');
    }