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
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_length_of :login, :maximum => 30
validates_length_of :login, :maximum => 60
validates_format_of :firstname, :lastname, :with => /^[\w\s\'\-\.]*$/i
validates_length_of :firstname, :lastname, :maximum => 30
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
class Login60 < ActiveRecord::Migration
def self.up
change_column :users, :login, :string, :limit => 60
end
def self.down
change_column :users, :login, :string, :limit => 30
end
end
    (1-1/1)