Hi,
I have added a form to og.module to display the og groups a user is assigned in the edit user form (the code is below).

function og_user($op, $edit, &$account, $category = NULL) {
global $user;

switch ($op) {
........
........
case 'form':
$result_og = db_query("SELECT title, nid FROM node WHERE type = 'og'");
if (user_access('administer organic groups')) {
while ($field = db_fetch_object($result_og)) {
if (!isset($fields['ogGroups'])) {
$fields['ogGroups'] = array('#type' => 'fieldset', '#title' => ogGroups, '#weight' => $w++);
}
$result_user = db_query("SELECT nid FROM og_uid WHERE $account->uid = uid && $field->nid = nid");
$chkbx_checked = 0;
while ($field_user = db_fetch_object($result_user)) {
if($field_user->nid == $field->nid) {
$chkbx_checked = 1;
break;
}
}
$fields['ogGroups'][$field->title] = array('#type' => 'checkbox',
'#title' => $field->title,
'#default_value' => $chkbx_checked,
);
}
}
return $fields;
break;
......

when the checkboxes are changed by the admin i want to save the changes when the admin clicks the submit button. how can i do this?

Bypass