Drupal Duplicate Sessions Issue

Submitted by Bill St. Clair on Fri, 2006-10-06 15:00.

fbomb at drupal.org - this blog was showing "You are not authorized..." messages today, on every page. I discovered the cause. I must have twice posted a delete request for a disapproving a spam user, and this had the side-effect of deleting user 0, the anonymous user, from my database. This caused the "not authorized" message and also a duplicate key database error on attempting to log in. ejk posted the fix:

Quote:
INSERT INTO users (uid, name, mail) VALUES ('0', '', '');
INSERT INTO users_roles (uid, rid) VALUES (0, 1);

( categories: Webmaster stuff )