The code inside hook_init, fill the $_SESSION array with some values and does some drupal_add_js, that maybe are not necessary if the user is not logged in.

I assume that this could be necessary for some projects, so why don't let the option to decide it? It could be a value stored in the drupal_variables table, managed from the nodejs settings form.

Comments

Anonymous’s picture

Title: Consider check if user is logged in hook_init, or add it as an option. » Allow an admin setting to only open sockets for logged in users
Version: 6.x-1.x-dev » 7.x-1.x-dev

node.js integration is not going to work without starting a session.

i'd consider a patch that only opens a socket for logged in users.

Anonymous’s picture

Status: Active » Fixed

i've added this support (without a GUI at this stage) with this commit:

http://drupalcode.org/project/nodejs.git/commit/d455caa55082a0950fe44479...

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

  • Commit d455caa on 7.x-1.x, 8.x-1.x, 8.x-1.x-head by beejeebus:
    #1418706: allow admins to configure node.js support for authenticated...