/** * Update group * * @access public * @param integer id of group * @param string name of group * @param boolean description of group * @param boolean activate group? * @param integer owner_user_id of group * @param integer owner_group_id of group * @param array Array of custom fields to be updated. * @return mixed boolean or DB Error object */ function updateGroup($group_id, $group_name, $group_description = null, $active = null, $owner_user = null, $owner_group = null, $customFields = array()) { $owner_user === null ? $owner_user = '******' : ($owner_user = (int) $owner_user); $owner_group === null ? $owner_group = 'null' : ($owner_group = (int) $owner_group); $customFields[] = array('name' => 'owner_user_id', 'value' => $owner_user); $customFields[] = array('name' => 'owner_group_id', 'value' => $owner_group); $result = parent::updateGroup($group_id, $group_name, $group_description, $active, $customFields); if (DB::isError($result)) { return $result; } return true; }
/** * Update group * * @access public * @param integer id of group * @param string name of group * @param string description of group * @param boolean activate group? * @param integer group type (one of LIVEUSER_GROUP_TYPE_*) * @param string define name for the group * @param integer owner_user_id of group * @param integer owner_group_id of group * @param array custom fields array('name'=>array('value'=>'foo')) * @return mixed boolean or DB Error object */ function updateGroup($group_id, $group_name, $group_description = null, $active = null, $define_name = null, $group_type = null, $owner_user = null, $owner_group = null, $customFields = array()) { is_null($owner_user) ? $owner_user = '******' : ($owner_user = (int) $owner_user); is_null($owner_group) ? $owner_group = 'NULL' : ($owner_group = (int) $owner_group); $customFields['owner_user_id'] = array('value' => $owner_user); $customFields['owner_group_id'] = array('value' => $owner_group); $result = parent::updateGroup($group_id, $group_name, $group_description, $active, $define_name, $group_type, $customFields); if (DB::isError($result)) { return $result; } return true; }