You are here

function opigno_lms_get_og_role_id in Opigno LMS 7

Get the default OG role ids.

Parameters

string $key:

Return value

int

Related topics

2 calls to opigno_lms_get_og_role_id()
opigno_lms_get_role_id in ./opigno_lms.profile
Get the default OG role ids.
opigno_lms_set_og_permissions in ./opigno_lms.profile
Set OG permissions for a specific bundle and specific roles. This function is globally available and modules and apps should use it to set default permissions, simplifying module installation and site management.

File

./opigno_lms.profile, line 488
Enables modules and site configuration for a standard site installation. Provides a default API for Apps and modules to use. This will simplify the user experience.

Code

function opigno_lms_get_og_role_id($key) {
  $roles =& drupal_static(__FUNCTION__);
  if (empty($roles)) {
    $roles = variable_get('opigno_lms_default_og_roles', array());
  }
  return !empty($roles[$key]) ? $roles[$key] : 0;
}