# Получить группу Discourse, с которой связан пользователь

**URL:** <https://meta.discourse.org/t/get-discourse-group-user-is-associated-with/131884>\
**Category:** WordPress\
**Created:** [25.Октябрь.2019 16:25:09 UTC](https://meta.discourse.org/t/get-discourse-group-user-is-associated-with/131884 "2019-10-25T16:25:09Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Chad\_Campbell](https://avatars.discourse-cdn.com/v4/letter/c/c2a13f/32.png) [@Chad\_Campbell](https://meta.discourse.org/u/Chad_Campbell)\
**Post date:** [25.Октябрь.2019 16:25:09 UTC](https://meta.discourse.org/t/get-discourse-group-user-is-associated-with/131884/1 "2019-10-25T16:25:09Z")

</div>

Привет! Я пытаюсь получить список групп, в которые входит пользователь. Казалось бы, эту информацию можно получить через функцию get\_discourse\_user, но она, похоже, не возвращает никаких данных о группах. Согласно этому посту, она должна это делать?

> [@Discourse as SSO host -\> Restrict content in WP based on Discourse groups](https://meta.discourse.org/t/discourse-as-sso-host-restrict-content-in-wp-based-on-discourse-groups/74509/7):
>
> I need to make a small change to the get\_discourse\_user function that has been added. It’s currently not returning the groups data. I can add a parameter to it so that it returns all the data that is available for the user. That will be in the next update - sometime later this week.

---

_[View the full topic](https://meta.discourse.org/t/get-discourse-group-user-is-associated-with/131884)._
