Drupal Duplicate Sessions Issue

Submitted by Bill St. Clair on Fri, 06 Oct 2006 20:00:17 GMT  <== Webmaster stuff ==> 

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:

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

Add comment Edit post Add post