From 6e92be67b007e4e9f4a071b9a82c7db8fbcee2af Mon Sep 17 00:00:00 2001 From: larcher Date: Fri, 11 Mar 2016 16:14:24 +0100 Subject: [PATCH] Issue #2684535 by larcher: Redirect to original destination after logging in --- simplesamlphp_auth.module | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/simplesamlphp_auth.module b/simplesamlphp_auth.module index bb97702..847c8f5 100644 --- a/simplesamlphp_auth.module +++ b/simplesamlphp_auth.module @@ -278,7 +278,8 @@ function simplesamlphp_auth_form_alter(&$form, $form_state, $form_id) { $login_path = variable_get('simplesamlphp_auth_login_path', 'saml_login'); $login_name = variable_get('simplesamlphp_auth_login_link_display_name', t('Federated Log In')); - $link = l($login_name, $login_path); + $destination = drupal_get_destination(); + $link = l($login_name, $login_path, array('query' => $destination)); // Add SAML login link to user login form. if ($form_id == 'user_login_block' || $form_id == 'user_account_form') {