drupal

Merge permissions of Drupal roles

  • Posted on: 25 November 2015

Merge permissions from multiple Drupal roles

First specity the new role which will be the source and destination for the merge

$source_role_names = array('blogger', 'editor')
$dest_role_name = 'merged';

Fetch the rid from the names

foreach ($source_role_names as $name) {
  $rid = user_role_load_by_name($name)->rid;
  $source_role_ids[$rid] = $rid;
}

Create the role if necessary.

Tags: 

Drupal multilanguage explained

  • Posted on: 20 November 2015

Drupal supports language handling functionality and enables the translation of the user interface to languages other than English. There are multiple modules that enable you to do that in different ways.

Read here about different ways to enable multilanguage in Drupal 7 and how this is handled in the database.

Tags: