Hi,

How can I programmatically ensure there's only one administrator for each group (i.e. when another user is promoted)? After getting the details of the current admin and promoting another user to admin status, I tried to update the record so the current admin will 'not be the admin' anymore, but it doesn't work. It meant that there are two administrators for this particular group. The code I am using is as follows:

  $m_account = $form_values['m_account'];
  og_save_subscription($gid, $m_account->uid, array('is_admin' => 0));
  drupal_set_message(t('%name is no longer a %ga', array('%name' => $m_account->name, '%ga' => t('group administrator'))));

Which is basically a version of the one promoting a user to admin. I get the message that it's been done, but it wasn't. Could you help please?

dantina.