Skip to content
This repository has been archived by the owner on Apr 17, 2018. It is now read-only.

Realnames #96

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Realnames #96

wants to merge 10 commits into from

Conversation

LucasSloan
Copy link
Contributor

Conflicts:
	r2/r2/public/static/main.css
	r2/r2/public/static/main.js
Conflicts:
	r2/r2/public/static/main.css
	r2/r2/public/static/main.js
 into realnames

Conflicts:
	r2/r2/lib/errors.py
@@ -600,6 +600,36 @@ def run(self, user_name):
except NotFound:
return user_name

realname_rx = re.compile(r"^[a-zA-Z\s\-]{3,40}$", re.UNICODE)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Lucas,

I think this regex excludes many valid names. Personally I know someone with é in their name and another with ä in their surname. Can you please tweak to allow non-ASCII characters.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

On Thu, May 1, 2014 at 5:25 PM, Wesley Moore [email protected]:

In r2/r2/controllers/validator/validator.py:

@@ -600,6 +600,36 @@ def run(self, user_name):
except NotFound:
return user_name

+realname_rx = re.compile(r"^[a-zA-Z\s-]{3,40}$", re.UNICODE)

Hi Lucas,

I this regex excludes many valid names. Personally I know someone with é
in their name and another with ä in their surname. Can you please tweak to
allow non-ASCII characters.


Reply to this email directly or view it on GitHubhttps://github.com//pull/96/files#r12214902
.

"And someday when the descendants of humanity have spread from star to
star, they won't tell the children about the history of Ancient Earth until
they're old enough to bear it; and when they learn they'll weep to hear
that such a thing as Death had ever once existed!
"

-Eliezer Yudkowsky

"Trust me" means "I love you" http://project-apollo.net/mos/mos114.html

"This isn't even my final form!"

-Tim Hausler

@@ -594,6 +611,7 @@ def POST_update(self, res, email, curpass, password, newpass, verpass):
elif email and (not hasattr(c.user,'email')
or c.user.email != email):
c.user.email = email
c.user._commit()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't required because the self.send_confirmation() call will commit anyway.

Changed minimum real name length to 1 character.
res._focus('real_name')
elif res._chk_error(errors.BAD_REALNAME_LONG):
res._focus('real_name')
if realname and realname == c.user.real_name:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems wrong to me. I think you should remove minimum length limits on real names and make it so that an empty string is interpreted as a request to delete.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tried that but it doesn't really work in this case - the update password/email/realname form handles 3 different actions - entering nothing should result in nothing happening. I suspect that people will want to remove their real name rarely enough to make the bizarre syntax acceptable, unless you have a better suggestion?

@jack-trikeapps
Copy link
Contributor

Sorry for the major delay, but we're should get this one over the line in one or two more passes.

@LucasSloan
Copy link
Contributor Author

I'll be working on this on my Sunday/your Monday - can you be available
then?

On Tue, Dec 16, 2014 at 9:38 PM, jack-trikeapps [email protected]
wrote:

Sorry for the major delay, but we're should get this one over the line in
one or two more passes.


Reply to this email directly or view it on GitHub
#96 (comment).

@jack-trikeapps
Copy link
Contributor

I think I can do that.

@LucasSloan
Copy link
Contributor Author

Most of your comments regarding the changes to validator.py are stylistic changes that would result in VRname not matching the style that was used for VUname. Do you think it's worth making validator.py less homogeneous?

… expression.

Indicate that a real name is optional on the preferences screen.
@jack-trikeapps
Copy link
Contributor

Yeah, I think that VUname is a bad classname, but it's more easily guessable than VRname, so calling the validator VRealName is going to be the best option imho.


if res._chk_error(errors.BAD_REALNAME_CHARS) or res._chk_error(errors.BAD_REALNAME_SHORT) or res._chk_error(errors.BAD_REALNAME_LONG):
res._focus('real_name')
if realname and realname == c.user.real_name:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the best way to deal with this is to pre-fill the form with the user's current realname, and if they blank it out then delete it from their profile. If it's unchanged then we can infer that the form is being used for something else (password change etc.).

Harmonize the real name validator syntax.
@e1red
Copy link

e1red commented Jul 21, 2016

Does this pass yet?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants