Commit b9914175379d8a991432ac26735150d54cd6dc18
1 parent
e76c5371
Exists in
master
and in
28 other branches
ActionItem980: avoid users putting e-mail as login
Showing
1 changed file
with
1 additions
and
0 deletions
Show diff stats
public/javascripts/application.js
@@ -30,6 +30,7 @@ function focus_first_field() { | @@ -30,6 +30,7 @@ function focus_first_field() { | ||
30 | /* * * Convert a string to a valid login name * * */ | 30 | /* * * Convert a string to a valid login name * * */ |
31 | function convToValidLogin( str ) { | 31 | function convToValidLogin( str ) { |
32 | return str.toLowerCase() | 32 | return str.toLowerCase() |
33 | + .replace( /@.*$/, "" ) | ||
33 | .replace( /á|à|ã|â/g, "a" ) | 34 | .replace( /á|à|ã|â/g, "a" ) |
34 | .replace( /é|ê/g, "e" ) | 35 | .replace( /é|ê/g, "e" ) |
35 | .replace( /í/g, "i" ) | 36 | .replace( /í/g, "i" ) |