Closed (fixed)
Project:
Bakery Single Sign-On System
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 Oct 2011 at 03:31 UTC
Updated:
19 Apr 2012 at 15:31 UTC
Jump to comment: Most recent file
Comments
Comment #1
glennpratt commentedFollowed a pattern seen elsewhere in Bakery.
Comment #2
dave reidWe have a function for this. :)
Comment #3
coltraneI didn't test, but it looks good. Thanks!
http://drupalcode.org/project/bakery.git/commit/0f56d3b
Comment #4
dave reidI'm a little confused on what the intent of this code is. drupal_goto() automatically supports redirecting to $_GET['destination'] if it is set, so you don't need to manually pass and check it. Is the intent just to 'reload' the page for anonymous users if they get logged in?
Comment #5
dave reidAck, drupal_get_query_parameters cannot be used since it lies in includes/common.inc which is not loaded when hook_boot() runs.
Comment #6
dave reidHah, nevermind. I missed the drupal_bootstrap() call.
Comment #7
coltranedrupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); happens earlier in _bakery_taste_chocolatechip_cookie() if the cookie is valid, so drupal_get_query_parameters() should be available.
"Is the intent just to 'reload' the page for anonymous users if they get logged in?"
Yes.
Comment #8
dave reidOk then this is the much simpler version of what you want for that code.
Comment #9
dave reidThis line is removed because in D6, core used $_REQUEST['destination']. In D7, core and any modules should only be using $_GET['destination']. This is likely a porting error and since I was messing with destination stuff I fixed this too.
tl;dr drupal_goto() for D7 doesn't give a crap about $_REQUEST at all. It only cares about $_GET.
Comment #10
coltraneWon't this still run into the OP issue? That is that if anything calls current_path() before shutdown there will be an undefined index?
@glennpratt if you get a change to test this please report back here
Comment #11
dave reidNo because we're no longer unsetting $_GET['q'].
Comment #12
coltraneCommitted. Thanks! http://drupalcode.org/project/bakery.git/commit/832f974
Comment #13
glennpratt commentedThank you!
Comment #14.0
(not verified) commentedFix typo