Signed-off-by: root <root@foreman.labo.org>
···
From: root --- app/models/user.rb | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)diff --git a/app/models/user.rb b/app/models/user.rb
index af2cad1…0d5ae61 100644
— a/app/models/user.rb
+++ b/app/models/user.rb
@@ -25,7 +25,7 @@ class User < ActiveRecord::Base
validates_uniqueness_of :login, :message => "already exists"
validates_presence_of :login, :mail, :auth_source_id
validates_presence_of :password_hash, :if => Proc.new {|user| user.manage_password?}
- validates_confirmation_of :password, :if => Proc.new {|user| user.manage_password?}, :unless => Proc.new {|user| user.password.empty?}
- validates_confirmation_of :password, :if => Proc.new {|user| user.manage_password?}, :unless => Proc.new {|user| user.password_confirmation.empty?}
validates_format_of :login, :with => /^[a-z0-9_-@.]$/i
validates_length_of :login, :maximum => 30
validates_format_of :firstname, :lastname, :with => /^[\w\s’-.]$/i, :allow_nil => true
–
1.7.1