public function checkLastPasswords(string $value, array $context): bool
    {
        // return true if config is not set
        if (empty($this->getConfig('oldPasswordCount'))) {
            return true;
        }

        // ignore on new user
        if (empty($context['data']['id'])) {
            return true;
        }
        $user = $this->_table->get($context['data']['id']);

        if (is_array($user->last_passwords)) {
            foreach ($user->last_passwords as $oldPasswordHash) {
                if ((new DefaultPasswordHasher)->check($value, $oldPasswordHash)) {
                    return false;
                }
            }
        }

        return true;
    }