Index: core/user.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/install_profile_api/core/Attic/user.inc,v
retrieving revision 1.1.2.7.2.1
diff -u -r1.1.2.7.2.1 user.inc
--- core/user.inc	11 Mar 2009 16:29:39 -0000	1.1.2.7.2.1
+++ core/user.inc	27 Oct 2009 20:26:07 -0000
@@ -68,6 +68,24 @@
 }
 
 /**
+ * Remove a role from the roles table and delete any user associations.
+ */
+function install_remove_role($name) {
+  $rid = install_get_rid($name);
+  if (!$rid) {
+    return FALSE;
+  }
+  
+  // Next 4 lines taken from core (user_admin_role_submit in user.admin.inc)
+  db_query('DELETE FROM {role} WHERE rid = %d', $rid);
+  db_query('DELETE FROM {permission} WHERE rid = %d', $rid);
+  // Update the users who have this role set:
+  db_query('DELETE FROM {users_roles} WHERE rid = %d', $rid);
+  
+  return TRUE;
+}
+
+/**
  * Get the role ID for the role name.
  */
 function install_get_rid($name) {
