https://www.redmine.org/
https://www.redmine.org/favicon.ico?1679302129
2010-03-05T10:44:18Z
Redmine
Redmine - Defect #4991: varchar(30) for login is too short when login=email (ldap typical usage)
https://www.redmine.org/issues/4991?journal_id=14927
2010-03-05T10:44:18Z
Thomas NOEL
<ul><li><strong>File</strong> <a href="/attachments/3307">redmine_login60.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/3307/redmine_login60.patch">redmine_login60.patch</a> added</li></ul><p>A solution (and it works...) :</p>
<pre>
diff -urN redmine.orig/app/models/user.rb redmine/app/models/user.rb
--- redmine.orig/app/models/user.rb 2010-03-05 10:40:26.000000000 +0000
+++ redmine/app/models/user.rb 2010-03-05 10:24:02.000000000 +0000
@@ -57,7 +57,7 @@
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
diff -urN redmine.orig/db/migrate/20100305102409_login60.rb redmine/db/migrate/20100305102409_login60.rb
--- redmine.orig/db/migrate/20100305102409_login60.rb 1970-01-01 00:00:00.000000000 +0000
+++ redmine/db/migrate/20100305102409_login60.rb 2010-03-05 10:31:21.000000000 +0000
@@ -0,0 +1,9 @@
+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
</pre>
Redmine - Defect #4991: varchar(30) for login is too short when login=email (ldap typical usage)
https://www.redmine.org/issues/4991?journal_id=14946
2010-03-06T17:31:56Z
Jean-Philippe Lang
jp_lang@yahoo.fr
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Closed</i></li><li><strong>Resolution</strong> set to <i>Duplicate</i></li></ul><p>See <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Defect: Increase username length limit from 30 to 60 (Closed)" href="https://www.redmine.org/issues/2719">#2719</a>.</p>