From 598e739208de28182f3329a2c23511f5c27489e5 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Tue, 29 Sep 2009 15:31:17 +0000 Subject: - Patch #578520 by sun | c960657, mfb, Dries, catch, mattyoung: make in url() only accept an array. Another nice API clean-up! --- modules/user/user.module | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'modules/user/user.module') 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; } + -- cgit v1.2.3