You are here

function _hosting_client_get_role in Hosting 7.4

Same name and namespace in other branches
  1. 5 client/hosting_client.module \_hosting_client_get_role()
  2. 6.2 client/hosting_client.module \_hosting_client_get_role()
  3. 7.3 client/hosting_client.module \_hosting_client_get_role()

Shortcut to get the rid of the 'aegir client' role.

This hardcodes the 'aegir client' role name, so if it is changed, this will fail.

@todo the rid or role name should be a variable

Deprecated

remove this function once the above setting is implemented

File

client/hosting_client.module, line 468

Code

function _hosting_client_get_role() {
  return db_query("SELECT rid FROM {role} WHERE name = :name", array(
    ':name' => 'aegir client',
  ))
    ->fetchField();
}