You are here

16 July 2011

This little snippet shows you how to create roles programmatically in Drupal 7.

Source code viewer
  1. $some_role = new stdClass();
  2. $some_role->name = 'role';
  3. user_role_save($some_role);
Programming Language: PHP