function theme_ldap_authentication_user_login_block_links in Lightweight Directory Access Protocol (LDAP) 7.2
Same name and namespace in other branches
- 8.2 ldap_authentication/ldap_authentication.theme.inc \theme_ldap_authentication_user_login_block_links()
- 7 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:
- $show_reset_pwd (boolean) whether reset password link should be visible
- auth_conf: object with ldap authentication configuration data
Return value
string
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) {
/** @var bool $show_reset_pwd */
/** @var object $auth_conf */
extract($variables);
// The code below modified from user.module user_login_block function.
$items = [];
if (variable_get('user_register', USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL)) {
$items[] = l(t('Create new account'), 'user/register', [
'attributes' => [
'title' => t('Create a new user account.'),
],
]);
}
if ($show_reset_pwd) {
$items[] = l(t('Request new password'), 'user/password', [
'attributes' => [
'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', [
'items' => $items,
]);
return $output;
}