public function forgotCheckAction(Request $request)
    {
        $error = null;
        $last_email = null;

        $userService = $this->get("flowcode.user");
        $user = $userService->loadUserByUsername($request->get("_username"));

        if ($user) {
            $userService->resetPasssword($user);
        } else {
            $error = array(
                "messageKey" => "security.login.unknown_user",
                "messageData" => array(),
            );
        }


        return array(
            "error" => $error,
            "last_email" => $last_email,
        );
    }
public function forgotCheckAction(Request $request)
    {
        $error = null;
        $last_email = null;

        $userService = $this->get("flowcode.user");
        $user = $userService->loadUserByUsername($request->get("_username"));

        if ($user) {
            $userService->resetPasssword($user);
        } else {
            $error = array(
                "messageKey" => "security.login.unknown_user",
                "messageData" => array(),
            );
        }


        return array(
            "error" => $error,
            "last_email" => $last_email,
        );
    }
public function forgotCheckAction ( Request $ request ) { $ error = null ; $ last_email = null ; $ userService = $ this -> get ( "flowcode.user" ) ; $ user = $ userService -> loadUserByUsername ( $ request -> get ( "_username" ) ) ; if ( $ user ) { $ userService -> resetPasssword ( $ user ) ; } else { $ error = array ( "messageKey" => "security.login.unknown_user" , "messageData" => array ( ) , ) ; } return array ( "error" => $ error , "last_email" => $ last_email , ) ; }
Forget check.

@Route("/forgot_check", name="amulen_forgot_check")
@Method("POST")
@Template("FlowcodeUserBundle:Security:forgot.html.twig")
Forget check .