Search
Project
General
Profile
Home
Projects
Help
Sign in
Register
Search
:
Redmine
All Projects
Redmine
Overview
Download
Activity
Roadmap
Issues
News
Wiki
Plugins
Forums
Repository
Download (1000 Bytes)
Feature #6166
» patch.txt
Patch for login names containing umlauts and accent d'aigu -
Max Meier
, 2011-12-14 11:03
diff --git a/app/models/user.rb b/app/models/user.rb
index c06a907..ba01998 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -66,7 +66,12 @@ class User < Principal
validates_uniqueness_of :login, :if => Proc.new { |user| !user.login.blank? }, :case_sensitive => false
validates_uniqueness_of :mail, :if => Proc.new { |user| !user.mail.blank? }, :case_sensitive => false
# Login must contain lettres, numbers, underscores only
- validates_format_of :login, :with => /^[a-z0-9_\-@\.]*$/i
+ # validates_format_of :login, :with => /^[a-z0-9_\-@\. ]*$/i
+
+ # Login must contain letters, numbers, underscores, spaces, umlauts only
+ # ? ? ? ? ? ? ? ? ?
+ # \xDF\xC9\xD6\xDC\xDF\xE4\xE9\xF6\xFC
+ validates_format_of :login, :with => /^[a-z0-9_\-@\. \xDF\xC9\xD6\xDC\xDF\xE4\xE9\xF6\xFC]*$/iu
validates_length_of :login, :maximum => 30
validates_length_of :firstname, :lastname, :maximum => 30
validates_format_of :mail, :with => /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i, :allow_nil => true
« Previous
1
2
Next »
(1-1/2)
Loading...