summaryrefslogtreecommitdiff
path: root/modules/user/user.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-09-29 15:31:17 +0000
committerDries Buytaert <dries@buytaert.net>2009-09-29 15:31:17 +0000
commit598e739208de28182f3329a2c23511f5c27489e5 (patch)
treeac6fa5fce35f2d60896660297ef1be52f0df728e /modules/user/user.module
parentcef10893892a1c40f73fd972969c3512b0983cd6 (diff)
downloadbrdo-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.module11
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;
}
+