Defect #2719 » 0001-Fixes-2719.patch
| app/models/user.rb | ||
|---|---|---|
| 57 | 57 |   validates_uniqueness_of :mail, :if => Proc.new { |user| !user.mail.blank? } | 
| 58 | 58 | # Login must contain lettres, numbers, underscores only | 
| 59 | 59 | validates_format_of :login, :with => /^[a-z0-9_\-@\.]*$/i | 
| 60 |   validates_length_of :login, :maximum => 30 | |
| 60 |   validates_length_of :login, :maximum => 60 | |
| 61 | 61 | validates_format_of :firstname, :lastname, :with => /^[\w\s\'\-\.]*$/i | 
| 62 | 62 | validates_length_of :firstname, :lastname, :maximum => 30 | 
| 63 | 63 |   validates_format_of :mail, :with => /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i, :allow_nil => true | 
| db/migrate/102_change_user_login_limit.rb | ||
|---|---|---|
| 1 | class ChangeUserNameLimit < ActiveRecord::Migration | |
| 2 | def self.up | |
| 3 | change_column :users, :login, :string, :limit => 60, :default => "", :null => false | |
| 4 | end | |
| 5 | ||
| 6 | def self.down | |
| 7 | change_column :users, :login, :string, :limit => 30, :default => "", :null => false | |
| 8 | end | |
| 9 | end | |