public function getGroups() {
        //The current platform user
        $user = $this->get("user");

        //The get group query;
        $statement = $this->database->select("g.*, count(m.object_group_id) AS members_count")
                        ->from("?groups g")
                        ->join("?objects_group m", "g.group_id=m.group_id", "LEFT")
                        ->where("g.group_owner", $this->database->quote($user->get("user_name_id")))
                        ->groupBy("g.group_name")
                        ->orderBy("g.group_lft", "ASC")->prepare();

        $results = $statement->execute();

        //Authorities Obbject
        $rows = $results->fetchAll();
        $groups = array();
        $right = array();
        foreach ($rows as $group) {

            //$lastrgt = end($right);

            if (count($right) > 0) {
                while(count($right) > 0 && $group['group_rgt'] > end($right)) {
                    array_pop($right);
                }
            }

            //Authority Indent
            $group["indent"] = sizeof($right);
            //Authority Permissions;
            $groups[] = $group;
            $right[] = $group['group_rgt'];
        }

        return $groups;
    }
public function getGroups() {
        //The current platform user
        $user = $this->get("user");

        //The get group query;
        $statement = $this->database->select("g.*, count(m.object_group_id) AS members_count")
                        ->from("?groups g")
                        ->join("?objects_group m", "g.group_id=m.group_id", "LEFT")
                        ->where("g.group_owner", $this->database->quote($user->get("user_name_id")))
                        ->groupBy("g.group_name")
                        ->orderBy("g.group_lft", "ASC")->prepare();

        $results = $statement->execute();

        //Authorities Obbject
        $rows = $results->fetchAll();
        $groups = array();
        $right = array();
        foreach ($rows as $group) {

            //$lastrgt = end($right);

            if (count($right) > 0) {
                while(count($right) > 0 && $group['group_rgt'] > end($right)) {
                    array_pop($right);
                }
            }

            //Authority Indent
            $group["indent"] = sizeof($right);
            //Authority Permissions;
            $groups[] = $group;
            $right[] = $group['group_rgt'];
        }

        return $groups;
    }
Returns a processed array of authority groups
@return array