You are here

function _opigno_lms_install_user_settings in Opigno LMS 7

Helper function to set default user settings and roles.

1 call to _opigno_lms_install_user_settings()
opigno_lms_install in ./opigno_lms.install
Implements hook_install().

File

./opigno_lms.install, line 171
Install, update and uninstall functions for the Opigno LMS installation profile.

Code

function _opigno_lms_install_user_settings() {

  // Enable user picture support and set the default to a square thumbnail option.
  variable_set('user_pictures', '1');
  variable_set('user_picture_dimensions', '1024x1024');
  variable_set('user_picture_file_size', '800');
  variable_set('user_picture_style', 'thumbnail');
  variable_set('user_picture_default', base_path() . 'profiles/opigno_lms/img/anonymous.png');

  // Allow visitor account creation with administrative approval.
  variable_set('user_register', USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL);

  // Enable default permissions for system roles. These are somehow never set with
  // the feature.
  user_role_grant_permissions(DRUPAL_AUTHENTICATED_RID, array(
    'access content',
    'use text format html',
  ));
}