# هل من الممكن تعيين تاريخ انتهاء صلاحية لحسابات المستخدمين؟

**URL:** <https://meta.discourse.org/t/is-it-possible-to-set-an-expiration-date-for-user-accounts/385691>\
**Category:** Development\
**Created:** [15 أكتوبر 2025، 12:35م UTC](https://meta.discourse.org/t/is-it-possible-to-set-an-expiration-date-for-user-accounts/385691 "2025-10-15T12:35:10Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [12 نوفمبر 2026، 3:42م UTC](https://meta.discourse.org/t/is-it-possible-to-set-an-expiration-date-for-user-accounts/385691/9 "2026-11-12T15:42:44Z")

</div>

لقد قمت بتنفيذه في إضافة كتبتها لدعم [https://www.refrunner.com/](https://www.refrunner.com/). شيء من هذا القبيل:

```plaintext
# frozen_string_literal: true

module Jobs
  class RemoveExpiredFreeMonthMembers < ::Jobs::Scheduled
    every 1.day

    def execute(args)
      return unless SiteSetting.discourse_citationwizard_enabled
      group_id = SiteSetting.citation_wizard_free_month_group.to_i
      return if group_id <= 0

      GroupUser
        .where(group_id: group_id)
        .where("user_id > 0")
        .where("created_at < ?", 1.month.ago)
        .delete_all
    end
  end
end

```

إذا لم يكن ذلك كافياً بالنسبة لك لحل المشكلة، يمكنك النشر في قناة #Marketplace و/أو التواصل معي.

---

_[View the full topic](https://meta.discourse.org/t/is-it-possible-to-set-an-expiration-date-for-user-accounts/385691)._
