shane-tomlinson / browserid-wordpress

Wordpress plugin that adds Persona authentication
23 stars 16 forks source link

Name is overwritten by Persona #14

Open callahad opened 11 years ago

callahad commented 11 years ago

If I type a name in the comment field, but post with Persona, the local part of my email address overwrites the name I typed in.

shane-tomlinson commented 11 years ago

@callahad - do you have a test site for this? I just tried it locally and all was good.

callahad commented 11 years ago

@shane-tomlinson I've got a VM handy. Will try to publish somewhere when I'm back from PTO.

edwindotcom commented 11 years ago

I repro'd this but only when i had signed in previously and made a comment. Here are my steps:

  1. make comment with name: user@yahoo.com
  2. click sign in button, go through the flow
  3. confirm comment submitted
  4. refresh browser,
  5. make comment again, use 'john doe' as username
  6. click sign in. In the persona dialog, use user@yahoo.com

result: your email is displayed in the comment, it's like we're picking up a cookie or something. expected: it should say 'john doe' as the username.

shane-tomlinson commented 11 years ago

@edmoz, @callahad - Are you using an email address that has a Gravatar profile?

shane-tomlinson commented 11 years ago

@edmoz, @callahad - the other thing is, does the email address already have an account on the site associated with it?

The current logic is (keep going down until match): 1) check whether there is an account for the email address, if yes, use the account's profile name, possibly overwriting the name entered by the user in the comment. 2) If no author name was given, check gravatar for a profile for the email address. If found, use the profile's displayName 3) If still no author, use the "local" half of the email address.