You are here

function ldap_help_get_user_settings in Lightweight Directory Access Protocol (LDAP) 7.2

Same name and namespace in other branches
  1. 8.2 ldap_help/ldap_help.status.inc \ldap_help_get_user_settings()
  2. 7 ldap_help/ldap_help.status.inc \ldap_help_get_user_settings()
1 call to ldap_help_get_user_settings()
ldap_help_status in ldap_help/ldap_help.status.inc

File

ldap_help/ldap_help.status.inc, line 257
Status file for ldaphelp module.

Code

function ldap_help_get_user_settings() {
  $user_register = variable_get('user_register', USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL);
  $options = [
    USER_REGISTER_ADMINISTRATORS_ONLY => t('Administrators only'),
    USER_REGISTER_VISITORS => t('Visitors'),
    USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL => t('Visitors, but administrator approval is required'),
  ];
  $status[] = [
    'title' => 'Who can register accounts?',
    'value' => $options[$user_register],
  ];
  return $status;
}