I've seen this happen once or twice before, but can't remember where or why.

Basically, in one of my page's HTML output, the first line of HTML is returned as 'bool(false)' - On that particular page, I have a function in hook_init() that logs in a user using user_login_finalize(). Here's the HTML from the

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML+RDFa 1.1//EN">
<html lang="en" dir="ltr" version="HTML+RDFa 1.1"

On the page as displayed, I get a blank line above my theme's header with this bool(false) appearing.

On refreshes, that goes away (basically, it only happens when I log in a user programmatically using user_login_finalize()).

1 Answer 1


It seems that the problem went away if I commented out the user_module_invoke() call inside user_login_finalize().

Obviously, I didn't want to maintain a patch for that, nor did I want to take out that behavior, as I may want to use hook_user_login() sometime. So, I basically copied user_login_finalize() into my own private function, removed the user_module_invoke() call, and am now using the private function for my particular need. Seems to be working fine!

  • 1
    In this way, you are curing the effects, not the cause. As user_login_finalize() doesn't normally create any problem, there must be a third-party module that is the cause of the problem; probably it's a module that implements hook_user_login() in the wrong way.
    – apaderno
    Oct 7, 2011 at 20:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.