{"action":"created","issue":{"url":"https://api.github.com/repos/AffiliateWP/AffiliateWP/issues/1156","repository_url":"https://api.github.com/repos/AffiliateWP/AffiliateWP","labels_url":"https://api.github.com/repos/AffiliateWP/AffiliateWP/issues/1156/labels{/name}","comments_url":"https://api.github.com/repos/AffiliateWP/AffiliateWP/issues/1156/comments","events_url":"https://api.github.com/repos/AffiliateWP/AffiliateWP/issues/1156/events","html_url":"https://github.com/AffiliateWP/AffiliateWP/issues/1156","id":141440333,"number":1156,"title":"Store user ID from posted username, rather than hidden input field","user":{"login":"sumobi","id":52581,"avatar_url":"https://avatars.githubusercontent.com/u/52581?v=3","gravatar_id":"","url":"https://api.github.com/users/sumobi","html_url":"https://github.com/sumobi","followers_url":"https://api.github.com/users/sumobi/followers","following_url":"https://api.github.com/users/sumobi/following{/other_user}","gists_url":"https://api.github.com/users/sumobi/gists{/gist_id}","starred_url":"https://api.github.com/users/sumobi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sumobi/subscriptions","organizations_url":"https://api.github.com/users/sumobi/orgs","repos_url":"https://api.github.com/users/sumobi/repos","events_url":"https://api.github.com/users/sumobi/events{/privacy}","received_events_url":"https://api.github.com/users/sumobi/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/AffiliateWP/AffiliateWP/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-03-17T00:23:32Z","updated_at":"2016-04-12T21:07:37Z","closed_at":null,"body":"Related: https://github.com/AffiliateWP/AffiliateWP/issues/1116\r\n\r\nAffiliateWP provides a popup when searching for an affiliate. If you click an affiliate in the search popup, it stores the affiliate's user ID in a hidden input field. This will not correctly store the affiliate's user ID in some instances. Here's a couple:\r\n\r\n1. When the site admin manually types in the affiliate's username, sees the affiliate they want, and finishes off typing without selecting the affiliate from the popup search box.\r\n\r\n2. When there's already an affiliate entered and the site admin deletes it then enters a new username, again without using the affiliate search.\r\n\r\nI propose we always work out the user ID based on the posted username, and not rely on the user ID posted along with the user_id field. This means the user ID will be always be correct, when the affiliate username is typed in by the site admin, or the username is selected from the search popup. It's an extra small step but much better IMO, unless I'm missing something obvious."},"comment":{"url":"https://api.github.com/repos/AffiliateWP/AffiliateWP/issues/comments/209102721","html_url":"https://github.com/AffiliateWP/AffiliateWP/issues/1156#issuecomment-209102721","issue_url":"https://api.github.com/repos/AffiliateWP/AffiliateWP/issues/1156","id":209102721,"user":{"login":"michaelbeil","id":4752949,"avatar_url":"https://avatars.githubusercontent.com/u/4752949?v=3","gravatar_id":"","url":"https://api.github.com/users/michaelbeil","html_url":"https://github.com/michaelbeil","followers_url":"https://api.github.com/users/michaelbeil/followers","following_url":"https://api.github.com/users/michaelbeil/following{/other_user}","gists_url":"https://api.github.com/users/michaelbeil/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelbeil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelbeil/subscriptions","organizations_url":"https://api.github.com/users/michaelbeil/orgs","repos_url":"https://api.github.com/users/michaelbeil/repos","events_url":"https://api.github.com/users/michaelbeil/events{/privacy}","received_events_url":"https://api.github.com/users/michaelbeil/received_events","type":"User","site_admin":false},"created_at":"2016-04-12T21:07:37Z","updated_at":"2016-04-12T21:07:37Z","body":"This would be an excellent change. I have come across it on several occasions. "}}