public function rememberPassword(
        AbstractUser $user,
        $recoverPasswordUrlName,
        $hashField = 'hash'
    ) {
        $recoveryHash = $this->recoveryHashGenerator->generate();
        $user->setRecoveryHash($recoveryHash);
        $this->manager->flush($user);

        $recoverUrl = $this
            ->router
            ->generate($recoverPasswordUrlName, [
                $hashField => $recoveryHash,
            ], true);

        $this
            ->passwordEventDispatcher
            ->dispatchOnPasswordRememberEvent(
                $user,
                $recoverUrl
            );

        return $this;
    }
public function rememberPassword(
        AbstractUser $user,
        $recoverPasswordUrlName,
        $hashField = 'hash'
    ) {
        $recoveryHash = $this->recoveryHashGenerator->generate();
        $user->setRecoveryHash($recoveryHash);
        $this->manager->flush($user);

        $recoverUrl = $this
            ->router
            ->generate($recoverPasswordUrlName, [
                $hashField => $recoveryHash,
            ], true);

        $this
            ->passwordEventDispatcher
            ->dispatchOnPasswordRememberEvent(
                $user,
                $recoverUrl
            );

        return $this;
    }
public function rememberPassword ( AbstractUser $ user , $ recoverPasswordUrlName , $ hashField = 'hash' ) { $ recoveryHash = $ this -> recoveryHashGenerator -> generate ( ) ; $ user -> setRecoveryHash ( $ recoveryHash ) ; $ this -> manager -> flush ( $ user ) ; $ recoverUrl = $ this -> router -> generate ( $ recoverPasswordUrlName , [ $ hashField => $ recoveryHash , ] , true ) ; $ this -> passwordEventDispatcher -> dispatchOnPasswordRememberEvent ( $ user , $ recoverUrl ) ; return $ this ; }
Set a user in a remember password mode. Also rises an event
to hook when this happens.

Recover url must contain these fields with these names

@param AbstractUser $user                   User
@param string       $recoverPasswordUrlName Recover password name
@param string       $hashField              Hash

@return $this Self object
Set a user in a remember password mode . Also rises an event to hook when this happens .