# كيف يمكنني تقييد الوصول إلى منتدى Discourse الخاص بي للمستخدمين الذين توقفوا عن دفع اشتراك العضوية؟

**URL:** <https://meta.discourse.org/t/how-can-i-restrict-access-to-my-discourse-forum-for-users-who-have-stopped-paying-for-my-membership/104195>\
**Category:** WordPress\
**Created:** [13 ديسمبر 2018، 3:47م UTC](https://meta.discourse.org/t/how-can-i-restrict-access-to-my-discourse-forum-for-users-who-have-stopped-paying-for-my-membership/104195 "2018-12-13T15:47:13Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Ryan\_Collins1](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ryan_collins1/32/76781_2.png) [@Ryan\_Collins1](https://meta.discourse.org/u/Ryan_Collins1)\
**Post date:** [14 ديسمبر 2018، 11:04م UTC](https://meta.discourse.org/t/how-can-i-restrict-access-to-my-discourse-forum-for-users-who-have-stopped-paying-for-my-membership/104195/5 "2018-12-14T23:04:54Z")

</div>

Yes, I am using the [WP Discourse](https://github.com/discourse/wp-discourse).

Thanks for sharing that link and the code about how to prevent some WP users from being able to login to Discourse. Big help!

I just have 3 additional questions for whenever you are able to reply:

1. Should I add that code to my theme’s functions.php file?

2. When a member cancels, they transition in wordpress from being a “s2Member Level 1” to a “Subscriber” - should I put if ( /\* Subscriber \*/ ) { in order to make it work?

3. If want to redirect Subscribers to a different page aside from the homepage, do I just change home\_url with a the url of my billing update page? (wp\_safe\_redirect( [myfishingcapecod.com/billing-update-page/()](http://myfishingcapecod.com/billing-update-page/()) );

Thank you very much for the support. Huge help!

---

_[View the full topic](https://meta.discourse.org/t/how-can-i-restrict-access-to-my-discourse-forum-for-users-who-have-stopped-paying-for-my-membership/104195)._
