I just want something similar to the function get_user_by_username
for groups.
Some hints:
The name of the group is a builtin attribute of groups accessible through group->name
. It looks like the metadata functions don't work for builtin attributes.
I'm using Elgg 1.8.1
I solved this with this function. I included it in a pull request to Elgg.
See also Cash' comment suggesting to use elgg_get_entities
to do the same thing more easily.