@ -138,6 +138,8 @@ class AccountController < ApplicationController
@user.password,@user.password_confirmation = password,password_confirmation
elsif !should_confirmation_password && !password.blank?
@user.password = password
else
@user.password = ""
end
case Setting.self_registration
when '1'
@ -930,7 +930,7 @@ class User < Principal
def validate_password_length
# 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)