Creating same user twice
jjeff - January 14, 2008 - 03:56
| Project: | Jott |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
In the process of testing things out, I deleted my Jott link an recreated it. Upon attempting to authenticate the second time I got the following error:
"user warning: Duplicate entry '4' for key 'PRIMARY' query: INSERT INTO jott_user (uid, userkey, postbackurl) VALUES (4, '6c3fff8d-cde7-4af0-9d75-a416c284458d', 'http://www.jott.com/LinkPostBack.ashx?endpointid=4601018&userkey=6c3fff8d-cde7-4af0-9d75-a416c284458d') in /usr/home/www/dailyreport.lullabot.com/includes/database.mysql.inc on line 172."
followed by the text:
"Your Jott Link is now active."

#1
I don't know if Jott is sending a new userkey for the new entry, but if so, we'll probably want a:
db_query('DELETE from {jott_user} WHERE uid = %d', $uid);(untested code)just before the INSERT statement.
...just a thought...
#2
Sure enough, I got a server error from Jott until I
a) deleted the row containing my uid from the jott_user table on my Drupal site, and then
b) deleted the custom Jott link and re-created it (no error message from Drupal site this time)
Then I was able to successfully post a message via Jott.
#3
Fix committed in HEAD, thanks