public function resetPassword($password, $token)
    {
        if (!$this->validatePasswordResetToken($token)) {
            return false;
        }
        $this->trigger(static::$eventBeforeResetPassword);
        $this->password = $password;
        $this->setPasswordResetToken();
        if (!$this->save()) {
            $this->trigger(static::$eventResetPasswordFailed);
            return false;
        }
        $this->trigger(static::$eventAfterResetPassword);
        return true;
    }