group::get_id_not_cached (private)
group::get_id_not_cached -group_name group_name \ [ -subsite_id subsite_id ] \ [ -application_group_id application_group_id ]
Defined in packages/acs-subsite/tcl/group-procs.tcl
Retrieve the group_id to a given group-name.
- Switches:
- -group_name (required)
- the name of the group to look for
- -subsite_id (optional)
- -application_group_id (optional)
- Returns:
- the id of the group
- Error:
- Authors:
- Christian Langmann <C_Langmann@gmx.de>
- Malte Sussdorff <openacs@sussdorff.de>
- Created:
- 2005-06-09
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: if {$subsite_id ne ""} { if {$application_group_id ne ""} { ad_log warning "group::get_id '$group_name': overwriting specified application_group_id by application group of subsite" } set application_group_id [application_group::group_id_from_package_id -package_id $subsite_id] } if {$application_group_id ne ""} { set group_ids [db_list get_group_id_with_application { SELECT g.group_id FROM acs_rels rels INNER JOIN composition_rels comp ON rels.rel_id = comp.rel_id INNER JOIN groups g ON rels.object_id_two = g.group_id WHERE rels.object_id_one = :application_group_id AND g.group_name = :group_name }] } else { set group_ids [db_list get_group_id { select group_id from groups where group_name = :group_name }] } if {[llength $group_ids] > 1} { ad_log warning "group::get_id for '$group_name' returns more than one value; returning the first one" } return [lindex $group_ids 0]XQL Not present: Generic PostgreSQL XQL file: packages/acs-subsite/tcl/group-procs-postgresql.xql
Oracle XQL file: packages/acs-subsite/tcl/group-procs-oracle.xql