{"action":"created","issue":{"url":"https://api.github.com/repos/elplatt/seltzer/issues/374","repository_url":"https://api.github.com/repos/elplatt/seltzer","labels_url":"https://api.github.com/repos/elplatt/seltzer/issues/374/labels{/name}","comments_url":"https://api.github.com/repos/elplatt/seltzer/issues/374/comments","events_url":"https://api.github.com/repos/elplatt/seltzer/issues/374/events","html_url":"https://github.com/elplatt/seltzer/issues/374","id":172849931,"number":374,"title":"Adding new member throws \"Duplicate Entry for Key PRIMARY\" SQL error","user":{"login":"ramgarden","id":2736589,"avatar_url":"https://avatars.githubusercontent.com/u/2736589?v=3","gravatar_id":"","url":"https://api.github.com/users/ramgarden","html_url":"https://github.com/ramgarden","followers_url":"https://api.github.com/users/ramgarden/followers","following_url":"https://api.github.com/users/ramgarden/following{/other_user}","gists_url":"https://api.github.com/users/ramgarden/gists{/gist_id}","starred_url":"https://api.github.com/users/ramgarden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ramgarden/subscriptions","organizations_url":"https://api.github.com/users/ramgarden/orgs","repos_url":"https://api.github.com/users/ramgarden/repos","events_url":"https://api.github.com/users/ramgarden/events{/privacy}","received_events_url":"https://api.github.com/users/ramgarden/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2016-08-24T02:20:05Z","updated_at":"2016-11-24T19:30:18Z","closed_at":null,"body":"After filling out the First Name, Last Name, Email, Phone number, emergency contact, and emergency phone fields then clicking the Add button it correctly saves the user and their info and their membership into the user_role table, but it throws this error and never gets to the step where it emails the admin user and the new user like it used to.  I've checked the line 120 in the /crm/modules/member/command.inc.php file and that's where it inserts the row into the user_role table and checks for SQL errors.  I looked in the DB before creating the new user and see that the last entry was 80-2 for example then add a new user and it throws error saying 81-2 is a duplicate entry.  I then refresh the view on the user_role table and just see the one new entry for 81-2.  It's almost like it's going into this piece of code twice or trying to save to the table twice?  It doesn't make sense that it would hit this same piece of code twice since it never sends the emails.  So it's like it's saving to the user_role table somewhere else first, then hitting this line in this section of code and throwing the error.\n`\n    Duplicate entry '82-2' for key 'PRIMARY'Array\n    (\n    [0] => Array\n        (\n            [file] => /home/content/s/a/i/username/html/webusername/crm/modules/member/command.inc.php\n            [line] => 120\n            [function] => crm_error\n            [args] => Array\n                (\n                    [0] => Duplicate entry '82-2' for key 'PRIMARY'\n                )\n\n```\n    )\n\n[1] => Array\n    (\n        [function] => command_member_add\n        [args] => Array\n            (\n            )\n\n    )\n\n[2] => Array\n    (\n        [file] => /home/content/s/a/i/username/html/webusername/crm/include/sys/command.inc.php\n        [line] => 36\n        [function] => call_user_func\n        [args] => Array\n            (\n                [0] => command_member_add\n            )\n\n    )\n\n[3] => Array\n    (\n        [file] => /home/content/s/a/i/username/html/webusername/crm/index.php\n        [line] => 36\n        [function] => command\n        [args] => Array\n            (\n                [0] => member_add\n            )\n\n    )\n\n)\n```\n\n`\n"},"comment":{"url":"https://api.github.com/repos/elplatt/seltzer/issues/comments/262835466","html_url":"https://github.com/elplatt/seltzer/issues/374#issuecomment-262835466","issue_url":"https://api.github.com/repos/elplatt/seltzer/issues/374","id":262835466,"user":{"login":"chris18890","id":3144892,"avatar_url":"https://avatars.githubusercontent.com/u/3144892?v=3","gravatar_id":"","url":"https://api.github.com/users/chris18890","html_url":"https://github.com/chris18890","followers_url":"https://api.github.com/users/chris18890/followers","following_url":"https://api.github.com/users/chris18890/following{/other_user}","gists_url":"https://api.github.com/users/chris18890/gists{/gist_id}","starred_url":"https://api.github.com/users/chris18890/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chris18890/subscriptions","organizations_url":"https://api.github.com/users/chris18890/orgs","repos_url":"https://api.github.com/users/chris18890/repos","events_url":"https://api.github.com/users/chris18890/events{/privacy}","received_events_url":"https://api.github.com/users/chris18890/received_events","type":"User","site_admin":false},"created_at":"2016-11-24T19:30:18Z","updated_at":"2016-11-24T19:30:18Z","body":"ah, ok, thanks! I'll look at getting this pushed into the latest dev build & pinging @elplatt to approve recent pull requests :)"}}
{"actor":{"display_login":"chris18890"}}