-
Notifications
You must be signed in to change notification settings - Fork 23
Realnames #96
base: master
Are you sure you want to change the base?
Realnames #96
Conversation
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
…ing names changed to RealName [username].
…ing names changed to RealName [username].
@@ -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) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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() |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
Sorry for the major delay, but we're should get this one over the line in one or two more passes. |
I'll be working on this on my Sunday/your Monday - can you be available On Tue, Dec 16, 2014 at 9:38 PM, jack-trikeapps [email protected]
|
I think I can do that. |
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.
Yeah, I think that |
|
||
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: |
There was a problem hiding this comment.
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.
Does this pass yet? |
http://code.google.com/p/lesswrong/issues/detail?id=381