Saturday, August 14, 2010

Drupal User Zero

Suddenly no messages displayed after user request new password. Turn out that it related to the fact that user 0 was missing. Since session in Drupal always associated with a user (user 0 for anoynimous), it always get rewritten when drupal can't find any user related in user table.

The fix is simple, repopulate user 0 in users table. The fun is when MySQL automatically increment auto_increment field when you passed in '0' in the insert query. Combined this with the fact that drupal can accidentally delete user 0 in certain cases.

No comments:

Post a Comment