If an user logs in with an OpenID, say Google account, goes to his/her account profile, opens "OpenID identities" page, and then clicks Google icon again, he/she will receive an error:

PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'https://www.google.com/accounts/o8/id?id=AItOawmsqcnpb-RGq1Gs1bT' for key 'authname': INSERT INTO {authmap} (uid, authname, module) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2); Array ( [:db_insert_placeholder_0] => 23 [:db_insert_placeholder_1] => https://www.google.com/accounts/o8/id?id=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx [:db_insert_placeholder_2] => openid ) in openid_user_identities() (line 43 of /xxx/public_html/sqllandbeta/modules/openid/openid.pages.inc).

In this case, I think it shouldn't allow the user to add Google OpenID again, and simply mention he/she already has Google OpenID.

Comments

onco_p53’s picture

Priority: Critical » Minor

I can confirm that this is a bug for me too, but the priority is low, all it does it pop up an error message, no harm done.

It would be nice to have a more user freindly message as suggested above.

qasimzee’s picture

I am also getting this issue. Any updates? Great module by the way.

qasimzee’s picture

ping

xurizaemon’s picture

Status: Active » Postponed (maintainer needs more info)

That error is coming from Drupal's OpenID module, not OpenID Selector. We don't call openid_user_identities() directly.

Is this an OpenID Selector bug because we're putting bad data into the {authmap} table or something else?

(NB: I haven't tried to repro this yet. More info welcome. In the unlikely event that this isn't a bug with this module, please correct the Project field on this issue.)