function og_node_delete_move_memberships in Organic groups 6
Same name and namespace in other branches
- 6.2 og.module \og_node_delete_move_memberships()
1 string reference to 'og_node_delete_move_memberships'
File
- ./
og.module, line 1952
Code
function og_node_delete_move_memberships($form, &$form_state) {
if ($form_state['values']['verb'] == OG_DELETE_MOVE_NODES_MEMBERSHIPS) {
$deleted_group_nid = $form_state['values']['nid'];
$target_group_nid = $form_state['values']['target'];
$sql = og_list_users_sql();
$result = db_query($sql, $deleted_group_nid);
$count = 0;
while ($row = db_fetch_object($result)) {
og_save_subscription($target_group_nid, $row->uid, array(
'is_active' => 1,
));
$count++;
}
drupal_set_message(format_plural($count, 'Moved 1 membership.', 'Moved @count memberships.'));
}
}