# Wordpress SSO - Restrict Content / user levels / groups

**URL:** <https://meta.discourse.org/t/wordpress-sso-restrict-content-user-levels-groups/57776>\
**Category:** WordPress\
**Created:** [February 22, 2017, 10:53am UTC](https://meta.discourse.org/t/wordpress-sso-restrict-content-user-levels-groups/57776 "2017-02-22T10:53:56Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)\
**Post date:** [July 23, 2020, 5:02pm UTC](https://meta.discourse.org/t/wordpress-sso-restrict-content-user-levels-groups/57776/8 "2020-07-23T17:02:02Z")

</div>

> [@deere](#):
>
> I’m still not having any success with the add\_user\_to\_discourse\_group function.

If possible, try creating a `debug.log` file on your WordPress server and then writing to that file from your `rcpdc_add_member_to_group` function. You can use that to make sure that the function is getting called and for checking that the correct values are being assigned to the variables you are creating.

For debugging, I usually use the approach that is described here: [Debugging in WordPress – Advanced Administration Handbook | Developer.WordPress.org](https://wordpress.org/support/article/debugging-in-wordpress/#wp_debug_log). You need to manually create the `debug.log` file and add it to your `wp-content` directory.

---

_[View the full topic](https://meta.discourse.org/t/wordpress-sso-restrict-content-user-levels-groups/57776)._
