22

I was browsing the API for the list of elected moderators, The API URL is

http://api.stackexchange.com/docs/elected-moderators#pagesize=100&order=desc&sort=reputation&site=stackoverflow&run=true

However the API returns Shog9 also

{
  "badge_counts": {
    "bronze": 219,
    "silver": 185,
    "gold": 28
  },
  "account_id": 620,
  "is_employee": true,
  "last_modified_date": 1481914533,
   "last_access_date": 1482245934,
  "age": 36,
  "reputation_change_year": 10402,
  "reputation_change_quarter": 2277,
  "reputation_change_month": 679,
  "reputation_change_week": 90,
  "reputation_change_day": 30,
  "reputation": 110058,
  "creation_date": 1218253990,
  "user_type": "moderator",
  "user_id": 811,
  "location": "Colorado, United States",
  "website_url": "http://shog9.com",
  "link": "https://stackoverflow.com/users/811/shog9",
  "profile_image": "https://www.gravatar.com/avatar/ae15c48f686a0ecb39848f980b296611?s=128&d=identicon&r=PG",
  "display_name": "Shog9"
},

The description reads

This method excludes Stack Exchange Inc. employees, unless they were actually elected moderators on a site (which can only have happened prior to their employment).

However the elections page does not list Shog as a moderator.

0

1 Answer 1

14

Funny story...

When I first joined the team here at Stack Exchange, Jeff just went around on the trilogy sites and made me a moderator... And he used the "elected" route instead of the "appointed" route, for reasons that are no doubt lost to time (or maybe they're preserved in chat, I can't be bothered to search).

This problem shows up on Super User and Server Fault as well, where for some inexplicable reason I was elected twice in the same week.

This undeserved moderator status was removed in the fall of 2011 (when, I believe, we implemented a proper "employee" account type to go with our snazzy new account system). But the record remains, and that's what's causing issues here.

The current logic for this particular API route just looks for users who...

  1. ...currently have moderator privileges on the site, and...
  2. ...have an "elected" record anywhere in their user history.

Note that this has the potential to fail in other ways:

  • it doesn't count moderators whose history records "appointed" rather than "elected" (this matters for folks like random, mmyers, Ivo Flipse and Marc Gravell, whose elections predate the creation of our current election system).
  • it would count an employee as an elected moderator even if they'd already stepped down by the time they became an employee. Jeremy Banks currently illustrates this by appearing as an elected moderator in the list.

Potential fixes

There are probably a few different ways we could fix this:

  1. Exclude anyone who has ever been an employee (this would cause the results to be incorrect on Skeptics though, as Sklivvz is an elected moderator and has been an employee).

  2. Special-case all of the weird stuff that happened back in the first few years of the network.

  3. Go back and re-write history to correct or remove all of the weird stuff that happened back in the first few years of the network.

I don't believe any of these are trivial.

2
  • 3
    Why can't you just do a one-time SQL update of your record (and maybe those other 2 guys)? Database admin FTW? :) Commented Mar 24, 2017 at 18:52
  • Well, I'm not a DB admin here, @Brock. Also... Way more than one record that'd have to be corrected.
    – Shog9
    Commented Mar 24, 2017 at 20:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .