|
|
@ -930,7 +930,7 @@ class User < Principal
|
|
|
|
|
|
|
|
|
|
|
|
def validate_password_length
|
|
|
|
def validate_password_length
|
|
|
|
# Password length validation based on setting
|
|
|
|
# Password length validation based on setting
|
|
|
|
if password.nil? || password.size < Setting.password_min_length.to_i
|
|
|
|
if !password.nil? && password.size < Setting.password_min_length.to_i
|
|
|
|
errors.add(:password, :too_short, :count => Setting.password_min_length.to_i)
|
|
|
|
errors.add(:password, :too_short, :count => Setting.password_min_length.to_i)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|