<?php public function getGroupId($groupName) { $db = JFactory::getDbo(); $query = $db->getQuery(true) ->select('id') ->from("#__usergroups") ->where("title = " . $db->q($groupName)); $db->setQuery($query); $result = $db->loadResult(); return $result ? $result : 2; }
You have javascript disabled. You will not be able to edit any code.