🇮🇳India @suyash.vaidya

Jaipur
Account created on 8 July 2019, over 5 years ago
#

Merge Requests

Recent comments

🇮🇳India suyash.vaidya Jaipur

Added new feature:
- Send the one time login link email to the relevant user.

🇮🇳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;
  }
}
Production build 0.71.5 2024