Opened 9 years ago
Closed 9 years ago
#7619 closed defect (bug) (fixed)
`groups_create_group()` messes with creator_id
| Reported by: | boonebgorges | Owned by: | boonebgorges |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.0 |
| Component: | Groups | Version: | |
| Severity: | normal | Keywords: | |
| Cc: |
Description
It's technically possible to update a group using groups_create_group(), but it is pretty finicky with respect to creator_id.
groups_create_group() assigns the logged-in user to creator_id. This means that, when running the function programatically or in a non-standard way, you have to manually pass creator_id to avoid having it overwritten with potentially incorrect information. https://buddypress.trac.wordpress.org/browser/tags/2.9.2/src/bp-groups/bp-groups-functions.php#L134
creator_id (and probably status?) should be inherited from the existing group, in the same way that $name and $slug are. https://buddypress.trac.wordpress.org/browser/tags/2.9.2/src/bp-groups/bp-groups-functions.php#L119
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
In 11735: