function ldap_authentication_check_for_email_template in Lightweight Directory Access Protocol (LDAP) 7.2
Form submit callback to check for an email template and redirect if needed.
1 call to ldap_authentication_check_for_email_template()
- ldap_authentication_init in ldap_authentication/
ldap_authentication.module - Implements hook_init().
1 string reference to 'ldap_authentication_check_for_email_template'
- _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.module, line 227 - This module injects itself into Drupal's Authentication stack.
Code
function ldap_authentication_check_for_email_template() {
if (!_ldap_authentication_verify_user_profile()) {
$url = 'user/ldap-profile-update';
$cp = current_path();
// Avoid redirects on these two pages.
if ($cp != $url && $cp != 'user/logout') {
if (isset($_GET['destination'])) {
unset($_GET['destination']);
}
drupal_goto($url, [
'query' => [
'next' => current_path(),
],
]);
}
}
}