Commit c22b520e authored by webchick's avatar webchick

#365597 by mfb, Jody Lynn: Don't show access denied when logging in via OpenID to user/login.

parent 65654b29
......@@ -121,7 +121,7 @@ function _openid_user_login_form_alter(&$form, &$form_state) {
'#weight' => -1,
'#description' => l(t('What is OpenID?'), 'http://openid.net/', array('external' => TRUE)),
);
$form['openid.return_to'] = array('#type' => 'hidden', '#value' => url('openid/authenticate', array('absolute' => TRUE, 'query' => drupal_get_destination())));
$form['openid.return_to'] = array('#type' => 'hidden', '#value' => url('openid/authenticate', array('absolute' => TRUE, 'query' => user_login_destination())));
}
/**
......
......@@ -3142,3 +3142,11 @@ function user_modules_uninstalled($modules) {
->execute();
}
}
/**
* Rewrite the destination to prevent redirecting to login page after login.
*/
function user_login_destination() {
$destination = drupal_get_destination();
return $destination == 'destination=user%2Flogin' ? 'destination=user' : $destination;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment