Get gid of group node
Note that the entity id is the gid in the current OG 2.x version(s) (there is some confusion around the change from earlier OG versions where GIDs were NOT entity ids)

From


  ... the group ID is the identifier of the entity. if i have a group which is a node the group ID will the be node ID. If i create a group which is a user the group ID will be the user ID and if i have a group which is a taxonomy term the group ID will the term ID.


Use og_is_group to determine if the node in question is acting as a group.