/**
* Load a group from database.
*
* @param integer $id Group identifier
*
* @return mixed
*
* @since 3.6.3
*/
public function load($id)
{
// Cast as integer until method is typehinted.
$id = (int) $id;
$db = Factory::getDbo();
$query = $db->getQuery(true)->select('*')->from($db->quoteName('#__usergroups'))->where($db->quoteName('id') . ' = :id')->bind(':id', $id, ParameterType::INTEGER);
$db->setQuery($query);
$group = $db->loadObject();
if (!$group) {
return false;
}
return $this->populateGroupData($group);
}