I've had this running well for quite a while, but things appear to have broken when I ran a drush update. The update took me from Drupal 7.0 to 7.19. It also took me from Webserver Auth 7.x-1.x-dev to 7.x-1.0-beta1.
After that update, a user is passed to the site after HTTP AUTH, but they aren't logged in to drupal. In the logs, I get:
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'username' for key 'name': INSERT INTO {users} (uid, name, pass, created, access, status, init, data) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7); Array ( [:db_insert_placeholder_0] => 269 [:db_insert_placeholder_1] => vemuris [:db_insert_placeholder_2] => $S$D6ZYzW.PoOgEeGj7bAUcxZ2qsWlYrbkxbUq28QcU2a8ZMcgUQrEx [:db_insert_placeholder_3] => 1363199208 [:db_insert_placeholder_4] => 1363199208 [:db_insert_placeholder_5] => 1 [:db_insert_placeholder_6] => username [:db_insert_placeholder_7] => a:1:{s:7:"contact";i:1;} ) in drupal_write_record() (line 7106 of /var/www/portal/includes/common.inc).
followed by:
unable to create new user record for user: username. This is probably because they already exist in the user table but not in the authmap table for webserver_auth.
Comments
Comment #1
specky_rum commentedAs the error message states, it is because the user already exists in the user table but is not in the authmap table. Add them to authmap or remove them from users.
Comment #1.0
specky_rum commentedAdded information on version changes.