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') {