ushahidi / Ushahidi_Web

Ushahidi v2. A platform that allows information collection, visualization and interactive mapping, allowing anyone to submit information through text messaging using a mobile phone, email or web form.
http://www.ushahidi.com
Other
900 stars 624 forks source link

Duplicate entry reported by database when submitting a checkin #505

Closed eyedol closed 11 years ago

eyedol commented 12 years ago

Database error: Duplicate entry 'addhen@linuxmail.org' for key 'uniq_email' - UPDATE users SET name = 'Henry Addo', email = 'myemail@hostname.com' WHERE id = 6

To reproduce this, try submitting a checkin with the same full name and email address on different devices.

rjmackay commented 12 years ago

Looks like this happens when the email address was already in the users table, then the users updates email in the mobile app. The user gets loaded based on device id/mobile id and then we try to update it with the new email details.

Not sure on the best solution here.. should we delete the mobileid based users and pair this checkin and future/older ones against the email based user? @eyedol thoughts?

rjmackay commented 12 years ago

Or I could just throw an error saying 'email in use'? but that doesnt make much sense without proper API auth

kamaulynder commented 11 years ago

Seeing checkins are as good as obsolete, closing this!