You are here

function theme_ldap_authentication_user_pass_message in Lightweight Directory Access Protocol (LDAP) 7

Same name and namespace in other branches
  1. 8.2 ldap_authentication/ldap_authentication.theme.inc \theme_ldap_authentication_user_pass_message()
  2. 7.2 ldap_authentication/ldap_authentication.theme.inc \theme_ldap_authentication_user_pass_message()

Returns HTML warning text for request new password/password reset form.

Parameters

$variables: An associative array containing:

  • auth_conf: object with ldap authentication configuration data
1 theme call to theme_ldap_authentication_user_pass_message()
ldap_authentication_form_user_pass_alter in ldap_authentication/ldap_authentication.module
Implements hook_form_FORM_ID_alter().

File

ldap_authentication/ldap_authentication.theme.inc, line 47
theming functions for ldap_authentication module

Code

function theme_ldap_authentication_user_pass_message($variables) {
  extract($variables);
  if ($auth_conf->authenticationMode == LDAP_AUTHENTICATION_EXCLUSIVE) {
    $msg = t('This page is only useful for the site administrator.  All other users
      need to reset their passwords');
    if ($auth_conf->ldapUserHelpLinkUrl) {
      $msg .= ' ' . t('at') . ' ' . l(t($auth_conf->ldapUserHelpLinkText), $auth_conf->ldapUserHelpLinkUrl) . '.';
    }
    else {
      $msg .= ' ' . t('with one of your organizations password management sites.');
    }
  }
  else {

    // mixed mode
    $msg = "";

    // warning will come up on validation.  we do not know if the user is ldap authenticated or not until they submit form.
  }
  return $msg;
}