private function handlePostReset(Request $request, FormInterface $form)
    {
        $event = new AccessControlEvent($request);
        $username = $form->get('username')->getData();

        // Send a password request mail, if username exists.
        if ($username === null || $username === '') {
            $this->flashes()->error(Trans::__('general.phrase.please-provide-username'));
        } else {
            $this->password()->resetPasswordRequest($username, $request->getClientIp(), $event);
            $response = $this->redirectToRoute('login');
            $response->setVary('Cookies', false)->setMaxAge(0)->setPrivate();

            return $response;
        }

        return null;
    }
private function handlePostReset(Request $request, FormInterface $form)
    {
        $event = new AccessControlEvent($request);
        $username = $form->get('username')->getData();

        // Send a password request mail, if username exists.
        if ($username === null || $username === '') {
            $this->flashes()->error(Trans::__('general.phrase.please-provide-username'));
        } else {
            $this->password()->resetPasswordRequest($username, $request->getClientIp(), $event);
            $response = $this->redirectToRoute('login');
            $response->setVary('Cookies', false)->setMaxAge(0)->setPrivate();

            return $response;
        }

        return null;
    }
private function handlePostReset ( Request $ request , FormInterface $ form ) { $ event = new AccessControlEvent ( $ request ) ; $ username = $ form -> get ( 'username' ) -> getData ( ) ; // Send a password request mail, if username exists. if ( $ username === null || $ username === '' ) { $ this -> flashes ( ) -> error ( Trans :: __ ( 'general.phrase.please-provide-username' ) ) ; } else { $ this -> password ( ) -> resetPasswordRequest ( $ username , $ request -> getClientIp ( ) , $ event ) ; $ response = $ this -> redirectToRoute ( 'login' ) ; $ response -> setVary ( 'Cookies' , false ) -> setMaxAge ( 0 ) -> setPrivate ( ) ; return $ response ; } return null ; }
Handle a password reset POST.

@param Request       $request
@param FormInterface $form

@return RedirectResponse
Handle a password reset POST .