You are here

function _security_review_default_untrusted_roles in Security Review 7

Helper function defines the default untrusted Drupal roles.

2 calls to _security_review_default_untrusted_roles()
security_review_settings in ./security_review.pages.inc
Module settings form.
security_review_untrusted_roles in ./security_review.inc
Helper function for user-defined or default unstrusted Drupal roles.

File

./security_review.inc, line 848
Stand-alone security checks and review system.

Code

function _security_review_default_untrusted_roles() {
  $roles = array(
    DRUPAL_ANONYMOUS_RID => t('anonymous user'),
  );
  $user_register = variable_get('user_register', 1);

  // If visitors are allowed to create accounts they are considered untrusted.
  if ($user_register != USER_REGISTER_ADMINISTRATORS_ONLY) {
    $roles[DRUPAL_AUTHENTICATED_RID] = t('authenticated user');
  }
  return $roles;
}