Re: That seems to have almost done it

kentr's picture
Offline
Joined: 07/18/2009
Juice: 27
Re: That seems to have almost done it

Hmm, looking at uc_roles_user_submit(), this may be where the existing roles are being deleted:

<?php
 
// If a user's role is removed using Drupal, then so is any expiration data.
 
if (is_array($edit['roles'])) {
    foreach (
$account->roles as $rid => $role) {
      if (!
in_array($rid, array_keys($edit['roles'])) && $rid != DRUPAL_AUTHENTICATED_RID) {
       
uc_roles_delete($account, $rid);
      }
    }
  }
?>

The next user might try adding the existing roles to $edit['roles']

Action for uc_roles By: kentr (8 replies) Sun, 12/06/2009 - 03:23