- Output for 7.1.25 - 7.1.33, 7.2.0 - 7.2.24, 7.3.0 - 7.3.11
- Parse error: syntax error, unexpected 'public' (T_PUBLIC), expecting end of file in /in/e3gTP on line 3
Process exited with code 255.
<?php
public function getGroupId($groupName)
{
$db = JFactory::getDbo();
$query = $db->getQuery(true)
->select('id, title')
->from("#__usergroups")
->where("title = " . $db->q($groupName));
$db->setQuery($query);
$result = $db->loadResult();
return $result ? $result : false;
}