# File app/models/user.rb, line 55 def create_from_omniauth(auth, ldap = false) gitlab_auth.create_from_omniauth(auth, ldap) end
# File app/models/user.rb, line 41 def filter filter_name case filter_name when "admins"; self.admins when "blocked"; self.blocked when "wop"; self.without_projects else self.active end end
# File app/models/user.rb, line 63 def find_for_ldap_auth(auth, signed_in_resource = nil) gitlab_auth.find_for_ldap_auth(auth, signed_in_resource) end
# File app/models/user.rb, line 59 def find_or_new_for_omniauth(auth) gitlab_auth.find_or_new_for_omniauth(auth) end
# File app/models/user.rb, line 67 def gitlab_auth Gitlab::Auth.new end
# File app/models/user.rb, line 71 def search query where("name LIKE :query or email LIKE :query", query: "%#{query}%") end
# File app/models/user.rb, line 51 def without_projects where('id NOT IN (SELECT DISTINCT(user_id) FROM users_projects)') end
# File app/models/user.rb, line 76 def generate_password if self.force_random_password self.password = self.password_confirmation = Devise.friendly_token.first(8) end end