You are here

function user_revision_add_role in User Revision 7.2

Function to add a role to user_revision_roles table.

3 calls to user_revision_add_role()
user_revision_table_init_data_batch_process in ./user_revision.batch.inc
Batch process callback.
user_revision_update_7002 in ./user_revision.install
Create revisions with user roles.
_user_save_revision in ./user_revision.module
Save record to the database.

File

./user_revision.module, line 638
Enables user revision.

Code

function user_revision_add_role($uid, $vid, $rid) {

  // Add roles to user_revision_roles table.
  db_insert('user_revision_roles')
    ->fields(array(
    'uid' => $uid,
    'vid' => $vid,
    'rid' => $rid,
  ))
    ->execute();
}