private function setEncodePassword(User $user, $plainPassword)
    {
        $password = $this->encoderFactory->getEncoder($user)->encodePassword(
            $plainPassword,
            $user->getSalt()
        );

        $user->setPassword($password);
    }
private function setEncodePassword(User $user, $plainPassword)
    {
        $password = $this->encoderFactory->getEncoder($user)->encodePassword(
            $plainPassword,
            $user->getSalt()
        );

        $user->setPassword($password);
    }
private function setEncodePassword ( User $ user , $ plainPassword ) { $ password = $ this -> encoderFactory -> getEncoder ( $ user ) -> encodePassword ( $ plainPassword , $ user -> getSalt ( ) ) ; $ user -> setPassword ( $ password ) ; }
Encode plain password
@param User $user
@param string $plainPassword
Encode plain password