Back to UserGroupsHelper class

Method has

public bool
has
(mixed $id)
Check if a group is in the list.
Parameters
  • int $id Group identifier
Returns
  • bool
Since
  • 3.6.3

Method has - Source code

/**
 * Check if a group is in the list.
 *
 * @param   integer  $id  Group identifier
 *
 * @return  boolean
 *
 * @since   3.6.3
 */
public function has($id)
{
    return \array_key_exists($id, $this->groups) && $this->groups[$id] !== false;
}