function group_autocomplete_result_gid in Group 7
Retrieves the group id from an autocomplete result.
Parameters
string $result: The result returned by a group autocomplete field.
Return value
int|false The group id (gid) of the result or FALSE on failure.
See also
1 call to group_autocomplete_result_gid()
- gnode_node_validate in modules/
gnode/ gnode.module - Implements hook_node_validate().
File
- helpers/
group.inc, line 109 - Group related helper functions.
Code
function group_autocomplete_result_gid($result) {
if (preg_match('/(\\d+)\\)$/', $result, $matches)) {
return $matches[1];
}
return FALSE;
}