Project

General

Profile

Defect #4991 ยป redmine_login60.patch

Thomas NOEL, 2010-03-05 11:44

View differences:

redmine/app/models/user.rb 2010-03-05 10:24:02.000000000 +0000
57 57
  validates_uniqueness_of :mail, :if => Proc.new { |user| !user.mail.blank? }, :case_sensitive => false
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
redmine/db/migrate/20100305102409_login60.rb 2010-03-05 10:31:21.000000000 +0000
1
class Login60 < ActiveRecord::Migration
2
  def self.up
3
    change_column :users, :login, :string, :limit => 60
4
  end
5

  
6
  def self.down
7
    change_column :users, :login, :string, :limit => 30
8
  end
9
end
    (1-1/1)