diff options
author | Dries Buytaert <dries@buytaert.net> | 2009-09-29 15:31:17 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2009-09-29 15:31:17 +0000 |
commit | 598e739208de28182f3329a2c23511f5c27489e5 (patch) | |
tree | ac6fa5fce35f2d60896660297ef1be52f0df728e /modules/user/user.module | |
parent | cef10893892a1c40f73fd972969c3512b0983cd6 (diff) | |
download | brdo-598e739208de28182f3329a2c23511f5c27489e5.tar.gz brdo-598e739208de28182f3329a2c23511f5c27489e5.tar.bz2 |
- Patch #578520 by sun | c960657, mfb, Dries, catch, mattyoung: make in url() only accept an array. Another nice API clean-up!
Diffstat (limited to 'modules/user/user.module')
-rw-r--r-- | modules/user/user.module | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/modules/user/user.module b/modules/user/user.module index 2de52e237..ad3690c03 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -3139,9 +3139,16 @@ function user_modules_uninstalled($modules) { } /** - * Rewrite the destination to prevent redirecting to login page after login. + * 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. */ function user_login_destination() { $destination = drupal_get_destination(); - return $destination == 'destination=user%2Flogin' ? 'destination=user' : $destination; + if ($destination['destination'] == 'user/login') { + $destination['destination'] = 'user'; + } + return $destination; } + |