diff options
Diffstat (limited to 'modules/user/user.module')
-rw-r--r-- | modules/user/user.module | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/user/user.module b/modules/user/user.module index 3cf6871f3..dd05a9efd 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -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; +} |