Skip to content

Instantly share code, notes, and snippets.

@angry-dan
Created April 29, 2016 14:25
Show Gist options
  • Save angry-dan/9b55b2aa6a0c55b5cca64e96845b2dba to your computer and use it in GitHub Desktop.
Save angry-dan/9b55b2aa6a0c55b5cca64e96845b2dba to your computer and use it in GitHub Desktop.
<?php
// When updating a user role, the role export module can be a bit funny.
db_query("DELETE FROM {role} where name = 'NEW NAME' and rid != EXISTING_RID");
db_query("UPDATE {role} set name = 'NEW NAME' where rid = EXISTING_RID");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment