You are here

function theme_ldap_authentication_user_login_block_links 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_login_block_links()
  2. 7.2 ldap_authentication/ldap_authentication.theme.inc \theme_ldap_authentication_user_login_block_links()

Returns HTML for user login block links.

Parameters

$variables: An associative array containing:

  • hide_reset_pwd (boolean) whether reset password link should be visible
  • auth_conf: object with ldap authentication configuration data
1 theme call to theme_ldap_authentication_user_login_block_links()
_ldap_authentication_login_form_alter in ldap_authentication/ldap_authentication.inc
helper function for ldap_authn_form_user_login_block_alter and ldap_authn_form_user_login_alter

File

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

Code

function theme_ldap_authentication_user_login_block_links($variables) {
  extract($variables);

  // the code below modified from user.module user_login_block function
  $items = array();
  if (variable_get('user_register', USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL)) {
    $items[] = l(t('Create new account'), 'user/register', array(
      'attributes' => array(
        'title' => t('Create a new user account.'),
      ),
    ));
  }
  if ($show_reset_pwd) {
    $items[] = l(t('Request new password'), 'user/password', array(
      'attributes' => array(
        'title' => t('Request new password via e-mail.'),
      ),
    ));
  }
  elseif ($auth_conf->ldapUserHelpLinkUrl) {
    $items[] = l(t($auth_conf->ldapUserHelpLinkText), $auth_conf->ldapUserHelpLinkUrl);
  }
  $output = theme('item_list', array(
    'items' => $items,
  ));
  return $output;
}