Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Drupal: session variable is lost when not logged in

I have a module in Drupal 6 that saves some information in the $_SESSION array. I use this information to customize some content in another page.

The problem is that when I'm not logged in Drupal, the information is not saved in the session. When I'm logged in, it works as expected.

Any ideas? Thanks.

like image 282
Vinicius Pinto Avatar asked Aug 20 '26 05:08

Vinicius Pinto


1 Answers

Found the answer here. There must be an user with uid = 0 at the "users" table. For some reason my project didn't have one, so I inserted it manually and the session variables are now being saved.

like image 191
Vinicius Pinto Avatar answered Aug 24 '26 08:08

Vinicius Pinto