/** * Implements hook_user_role_insert(). */ function {{ machine_name }}_user_role_insert($role) { // Save extra fields provided by the module to user roles. db_insert('my_module_table') ->fields(array( 'rid' => $role->rid, 'role_description' => $role->description, )) ->execute(); }