I use og_user_roles module to assign user role when registered users join a group or create a group. I'm trying to assign "authenticated group user" role for join a group and "group owner" role for creating a group. However, it only updated og_user_roles table but not user_roles table.
I did try to trigger an action as well. It did run the code in function views_bulk_operations_user_roles_action() in user_roles.action.inc and function user_save() in user.module.
It did come in to the code below: (in user_save() function)
foreach (array_keys($array['roles']) as $rid) {
if (!in_array($rid, array(DRUPAL_ANONYMOUS_RID, DRUPAL_AUTHENTICATED_RID))) {
db_query('INSERT INTO {users_roles} (uid, rid) VALUES (%d, %d)', $account->uid, $rid);
drupal_set_message("DEBUG: views_bulk_operations_user_roles_action: did come here 2 ".$rid); //Proof that the roles loaded as defined in the action
}
Still not updating user_roles table. Could anyone tell me what's going on? I miss something?
thank you in advance
Comments
by design
OGUR is meant to only give users specified roles (which can include the ability for some users to give certain roles to other users) -- but only within the context of that group -- not site wide. So it shouldn't update {user_roles}
Thank you Scottrigby
There's no way i can do to make it update {user_roles} ?