public function isPasswordValid($plainPassword, $user = null)
    {
        $user = $user ?: $this->getUser();

        return $this->passwordEncoder->isPasswordValid($user, $plainPassword);
    }
public function isPasswordValid($plainPassword, $user = null)
    {
        $user = $user ?: $this->getUser();

        return $this->passwordEncoder->isPasswordValid($user, $plainPassword);
    }
public function isPasswordValid ( $ plainPassword , $ user = null ) { $ user = $ user ? : $ this -> getUser ( ) ; return $ this -> passwordEncoder -> isPasswordValid ( $ user , $ plainPassword ) ; }
Returns true if the given plain password is valid for the current
application user or the optionally given user.

@param string $plainPassword
@param null   $user

@return bool
Returns true if the given plain password is valid for the current application user or the optionally given user .