What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 134 Stack Exchange communities.

Environment

I'm logging in using the OpenID from http://openid.stackexchange.com and using Chrome 31.0.1650.57 m if that matters.

Steps to reproduce:

Login to Data Explorer and compose a query e.g. like:

DECLARE @MyUserID INT = ##UserID:int##

SELECT TOP 1
    Id AS [Post Link],
    Score AS [Score],
    CreationDate AS [Creation Date]
FROM
    Posts 
WHERE
    OwnerUserId = @MyUserID AND
    PostTypeId IN (2, 3)
ORDER BY
    CreationDate
DESC

Then press the Run Query button and see if the UserID field is filled with your own user ID like shown in the below screenshot:

enter image description here

Question:

Did something changed on the ##UserID## parameter (e.g. that it's not supported anymore) ?

  • if so, then there is an outdated help paragraph about it (What's the point of logging in)
  • if not, it is a bug which is there about 3 days (I've been waiting since I noticed that you were going to do some changes to Data Explorer, but it remains there, hence my question)
share|improve this question
    
works for me in IE11 –  rene Dec 2 '13 at 12:13
    
works for me in Chrome as well... sorry... –  rene Dec 2 '13 at 12:19
    
Are you sure you are logged in? ie, your name is in the right top of your screen, not an login link? –  rene Dec 2 '13 at 12:21
    
@rene, I'm logged in for sure. Now I've cleared also the whole history data (all of the types). No change... I'm using Data Explorer quite frequently and I noticed this about 3 days ago on 2 computers... –  TLama Dec 2 '13 at 12:24
1  
I think it's related to OpenID provider. With this account I'm using Google as my provider and it's indeed not working, field not populated. My loyal sock is using Stack Exchange OpenID and it's working. @rene can you confirm too? (i.e. what is your OpenID provider) –  Shadow Wizard Dec 2 '13 at 12:27
    
Hmmm, I'm using Google as OpenId provider and it is working @ShaWizDowArd –  rene Dec 2 '13 at 12:33
    
@ShaWizDowArd, if we are talking about OpenID, then I'm using this one (I hope I got the point where to find this information). –  TLama Dec 2 '13 at 12:36
    
@rene and TLama yeah, this pretty much nullifies my assumption. Oh well, hope a dev or Tim Stone will come for the rescue. –  Shadow Wizard Dec 2 '13 at 12:37
1  
Can we blame this on caching? Maybe it depends on which side of the ocean you are? I'm on the good side... –  rene Dec 2 '13 at 12:42
    
@rene nope, it's one of the rare occasions when cache is not to blame... ;) –  Shadow Wizard Dec 2 '13 at 12:53
    
It is, @TLama - neither login credentials nor account information are shared between data.SE and the rest of the network, so this was implemented by assuming that email hashes would be identical between them... However, as ShaWizDowArd's answer attests, this is becoming less and less of a valid assumption due to privacy concerns surrounding the use of Gravatar. It might be possible to reimplement this using the API to authenticate, but... That's probably overkill. –  Shogging through the snow Dec 3 '13 at 1:21
    
@Shog9, ok, but isn't there any way to reset those EmailHash values to force them to refresh ? –  TLama Dec 3 '13 at 1:24
    
Yes, @TLama - as Sha describes in his answer, if you manually set your avatar to Gravatar it should work. However, this should still be considered an implementation detail at this point and likely to break without notice. (I've updated Sha's answer to clarify all of this) –  Shogging through the snow Dec 3 '13 at 1:25
    
@Shog9 API integration is actually on my todo list as a nice optional feature, especially if I can convince Nick to put network account IDs in the Users table too. –  Tim Stone Dec 3 '13 at 2:15
1  
@Shog9 I don't understand, Gravatar has nothing to do with this; that was just poor design choice, it's completely unnecessary for this function. You have my openId identity, which you have mapped to my userId in the database. It should be a simple matter to make a single call to retrieve that value and fill that in. There would be no way to use this to "spam users". –  BlueRaja May 15 at 15:13

1 Answer 1

up vote 26 down vote accepted

OK, cracked it.

Bottom line it's because Stack Exchange changed the Gravatar hashing algorithm recently, see here:

A fairly recent article on ArsTachnica, regarding how using Gravatars can leak an email address has prompted us to make some changes to how we produce the gravatar hash (under certain circumstances).

And the code to find the UserID per site is: (source)

string hash = Util.GravatarHash(user.Email);
try
{
    return cnn.Query<int?>("select top 1 Id from Users where EmailHash = @hash order by Reputation desc", new {hash}).FirstOrDefault();
}
catch
{ 
    // allow this to fail, its not critical
}

Which means Data Explorer is looking for hash that was changed. It didn't affect all users (see "under certain circumstances" in Oded reply above).

A possible workaround is changing your profile picture to Gravatar (not Identicon) and waiting for that to propagate to the data dump on Monday.

Selecting Gravatar

Note that this also may stop working at some point if Stack Exchange decides to stop publishing email hashes and merely proxy Gravatar images (or dump Gravatar entirely).

share|improve this answer
3  
WIZARDRY!​​​​​​​​​​​​​​​ –  Amal Murali Dec 2 '13 at 14:40
    
@Shog thanks for editing! Any alternative to find UserID then, so that Data Explorer won't stay in the dark? –  Shadow Wizard Dec 3 '13 at 7:57
2  
I'm affected and I've had a gravatar profile picture for years (so I can't change to using gravatar). Is there another workaround? –  Bohemian Jan 27 at 12:23
    
@Bohemian try changing to something else then back to Gravatar, hopefully it will "reset" the hash and next Monday (today if you're quick enough) it will be fine. –  Shadow Wizard Jan 27 at 12:33
    
@ShadowWizard: I just hit this issue and none of the listed workarounds have fixed the problem. Any other ideas? –  MrHen Mar 31 at 14:11
    
@MrHen sorry, not really. –  Shadow Wizard Mar 31 at 14:17
    
For me it stopped to work as well. I'll resolve this by modifying all the queries only for my private use by hardcocing my user ID. Not so cool, but I'm using that tool pretty frequently. You can do it too, @MrHen. –  TLama Mar 31 at 14:56
    
Maybe they changed the hash again... or ditched it as Shog warned. –  Shadow Wizard Mar 31 at 14:59
1  
That's why there are tons of duplicate queries with different user ids on data.SE –  Lankymart May 24 at 16:23
    
@Lankymart yep, good point! :/ –  Shadow Wizard May 24 at 17:12

You must log in to answer this question.

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