user_login_destination

Versions
7
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.

Code

modules/user/user.module, line 3251

<?php
function user_login_destination() {
  $destination = drupal_get_destination();
  if ($destination['destination'] == 'user/login') {
    $destination['destination'] = 'user';
  }
  return $destination;
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.