Skip to content

Commit 6e92be6

Browse files
larcherBalazs Dianiska
authored andcommitted
Issue #2684535 by larcher: Redirect to original destination after logging in
1 parent 8ddb559 commit 6e92be6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

simplesamlphp_auth.module

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,8 @@ function simplesamlphp_auth_form_alter(&$form, $form_state, $form_id) {
278278

279279
$login_path = variable_get('simplesamlphp_auth_login_path', 'saml_login');
280280
$login_name = variable_get('simplesamlphp_auth_login_link_display_name', t('Federated Log In'));
281-
$link = l($login_name, $login_path);
281+
$destination = drupal_get_destination();
282+
$link = l($login_name, $login_path, array('query' => $destination));
282283

283284
// Add SAML login link to user login form.
284285
if ($form_id == 'user_login_block' || $form_id == 'user_account_form') {

0 commit comments

Comments
 (0)