public function resetPassword($token, $newPassword)
    {
        $passwordReset = $this->getValidPasswordReset($token);
        if ($passwordReset === null) {
            return false;
        }
        $user = $passwordReset->get('user');
        $user = $this->userData->get($user['id']);
        $user->set('password', $newPassword);
        $this->userData->update($user);

        $reset = gmdate('Y-m-d H:i:s');
        $passwordReset->set('reset', $reset);
        $this->passwordResetData->update($passwordReset);

        return true;
    }