Remove hardcoded group types and/or unused code
marcp - November 4, 2009 - 00:32
| Project: | U Create |
| Version: | 6.x-1.0-beta2 |
| Component: | ucreate_og.module |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
This function in ucreate_og is scaring me away from trying ucreate:
<?php
/**
* This function returns role ids to assign to a given user based on given groups.
*
* @todo Move this to og_promote.
* @todo Doesn't seem to be used.
*/
function _ucreate_og_roles_based_on_groups($groups) {
$rids = array();
foreach ($groups as $group_id) {
$type = db_result(db_query('SELECT type FROM {node} WHERE nid = %d', $group_id));
if ($type == 'group_organization') {
$rids[4] = 4; // MEMBER ROLE
}
else if ($type == 'group_campaign') {
$rids[7] = 7; // GUEST ROLE
}
}
return $rids;
}
?>
#1
Gone. Can't deny the pedigree of a custom module.
#2
Automatically closed -- issue fixed for 2 weeks with no activity.