Skip to content

Commit

Permalink
Issue #2684535 by larcher: Redirect to original destination after log…
Browse files Browse the repository at this point in the history
…ging in
  • Loading branch information
larcher authored and Balazs Dianiska committed Mar 11, 2016
1 parent 8ddb559 commit 6e92be6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion simplesamlphp_auth.module
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down

0 comments on commit 6e92be6

Please sign in to comment.