# Discourse gem group\_add

**URL:** <https://meta.discourse.org/t/discourse-gem-group-add/25668>\
**Category:** Bug\
**Created:** [February 25, 2015, 12:01pm UTC](https://meta.discourse.org/t/discourse-gem-group-add/25668 "2015-02-25T12:01:45Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)\
**Post date:** [February 25, 2015, 1:09pm UTC](https://meta.discourse.org/t/discourse-gem-group-add/25668/2 "2015-02-25T13:09:13Z")

</div>

> [@dansingerman](#):
>
> Again I am happy to fix. Shall we just change the gem to fit the current Discourse API? It means we only need to change the code in the gem.

Feel free to make PRs to fix/improve the [`discourse_api`](https://github.com/discourse/discourse_api) gem 😉

> [@dansingerman](#):
>
> The drawback is that it is a little ugly to add users via username and remove via id in the interface.

The Discourse API is designed around the UI. It happens that admins

- often add users to a group via their username (hence the `add_members` _method_ which requires a list of `usernames`)
- rarely remove users from a group and do so by clicking the ❌ button next to the user (hence the `remove_member` _method_ which requires a `user_id`)

Again, feel free to make PRs to update the Discourse API if you want to:

- add the `add_member` / `remove_members` _methods_
- allow either of these _methods_ to take a `username` or a `user_id` as parameter.

---

_[View the full topic](https://meta.discourse.org/t/discourse-gem-group-add/25668)._
