{"action":"closed","issue":{"url":"https://api.github.com/repos/FirehoseCommunity/DEFCON/issues/47","labels_url":"https://api.github.com/repos/FirehoseCommunity/DEFCON/issues/47/labels{/name}","comments_url":"https://api.github.com/repos/FirehoseCommunity/DEFCON/issues/47/comments","events_url":"https://api.github.com/repos/FirehoseCommunity/DEFCON/issues/47/events","html_url":"https://github.com/FirehoseCommunity/DEFCON/issues/47","id":124621154,"number":47,"title":"Logging in turns users' admin flag to false","user":{"login":"jeffgerlach","id":13844570,"avatar_url":"https://avatars.githubusercontent.com/u/13844570?v=3","gravatar_id":"","url":"https://api.github.com/users/jeffgerlach","html_url":"https://github.com/jeffgerlach","followers_url":"https://api.github.com/users/jeffgerlach/followers","following_url":"https://api.github.com/users/jeffgerlach/following{/other_user}","gists_url":"https://api.github.com/users/jeffgerlach/gists{/gist_id}","starred_url":"https://api.github.com/users/jeffgerlach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeffgerlach/subscriptions","organizations_url":"https://api.github.com/users/jeffgerlach/orgs","repos_url":"https://api.github.com/users/jeffgerlach/repos","events_url":"https://api.github.com/users/jeffgerlach/events{/privacy}","received_events_url":"https://api.github.com/users/jeffgerlach/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/FirehoseCommunity/DEFCON/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-01-03T00:48:15Z","updated_at":"2016-01-04T00:24:10Z","closed_at":"2016-01-04T00:24:10Z","body":"Currently if you make a single user, their admin flag is set to true. But then when you log into the site, their sign in attributes are updated, which calls the before_save action (check_if_first_user) and sets the admin flag to false....and since there is a user in the database, it can never be set back to true."}}