pp_get_group_by_name()

/**
 * Retrieve a Permission Group object by providing its name

 * @param int group_name
 * @param string agent_type (pp_group, bp_group, etc.)
 * @return object Permission Group
 *  - ID
 *  - group_name
 *  - group_description
 *  - metagroup_type
 *  - metagroup_id
 */
function pp_get_group_by_name( $group_name, $agent_type = 'pp_group' )

Example usage

$group = pp_get_group_by_name( 'Cool Group' );

Notes

metagroup_type and metagroup_id do not apply to custom-defined groups. See Permission Groups description.

Professional publishing plugins for WordPress! Get PublishPress