You are here

function better_formats_new_role in Better Formats 6

Same name and namespace in other branches
  1. 6.2 better_formats.module \better_formats_new_role()

Creates base format default entry for a newly created role from role from.

See also

better_formats_form_alter()

1 string reference to 'better_formats_new_role'
better_formats_form_alter in ./better_formats.module
Implementation of hook_form_alter().

File

./better_formats.module, line 233
Enhances Drupal's core input format settings.

Code

function better_formats_new_role($form, &$form_state) {

  // Get the ID for the role just created.
  $sql = "SELECT rid\n          FROM {role}\n          ORDER BY rid DESC";
  $row = db_fetch_object(db_query_range($sql, 0, 1));
  better_formats_create_role($row->rid);
}