function user_login_destination

user_login_destination()

Helper function to rewrite the destination to avoid redirecting to login page after login.

Third-party authentication modules may use this function to determine the proper destination after a user has been properly logged in.

File

modules/user/user.module, line 4000
Enables the user registration and login system.

Code

function user_login_destination() {
  $destination = drupal_get_destination();
  if ($destination['destination'] == 'user/login') {
    $destination['destination'] = 'user';
  }
  return $destination;
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!user!user.module/function/user_login_destination/7.x