🇮🇳India suyash.vaidya Jaipur
🇮🇳India suyash.vaidya Jaipur
Added new feature:
- Send the one time login link email to the relevant user.
🇮🇳India suyash.vaidya Jaipur
suyash.vaidya → created an issue.
🇮🇳India suyash.vaidya Jaipur
@bellsworth, you can use the hook_link_alter()
for adding the language code as destination query parameter:
/**
* Implements hook_link_alter().
*/
function module_name_link_alter(array &$variables): void {
// Add language code as destination query string to SAML login menu link for returning user to correct language when path prefix language detection is used.
$url = $variables['url']->toString();
if ($url == '/saml/login') {
$language = \Drupal::languageManager()->getCurrentLanguage()->getId();
$variables['options']['query']['destination'] = $language;
}
}