Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

tuned user/validation methods a bit

  • Loading branch information...
commit 7cef95f18fb3e12c1a1979419d50ab57ce2d6d28 1 parent cba6302
@dimko dimko authored
Showing with 3 additions and 4 deletions.
  1. +3 −4 app/models/user/validation.rb
View
7 app/models/user/validation.rb
@@ -51,16 +51,15 @@ def using_openid
def password_required?
return false if using_openid
- crypted_password.blank? || !password.blank?
+ crypted_password.blank? || password.present?
end
def set_first_user_as_admin
- self.admin = true if site and site.users.size.zero?
+ self.admin = true if site && site.users.size.zero?
end
def normalize_login_and_email
- login.downcase! if login
- login.strip! if login
+ login.downcase! && login.strip! if login
email.downcase! if email
return true
end
Please sign in to comment.
Something went wrong with that request. Please try again.