function user_login_destination

7.x user.module user_login_destination()
6.x user.module user_login_destination()

Prepare a destination query string for use in combination with drupal_goto().

Used to direct the user back to the referring page after completing the openid login. This function prevents the login page from being returned because that page will give an access denied message to an authenticated user.

See also

drupal_get_destination()

1 call to user_login_destination()
openid_form_alter in drupal-6.x/modules/openid/openid.module
Implementation of hook_form_alter : adds OpenID login to the login forms.

File

drupal-6.x/modules/user/user.module, line 2565
Enables the user registration and login system.

Code

function user_login_destination() {
  $destination = drupal_get_destination();
  return $destination == 'destination=user%2Flogin' ? 'destination=user' : $destination;
}