- environment = Rails.configuration.environment
- adapter = Rails.configuration.database_configuration[environment]["adapter"]
- if adapter == "postgresql"
- user = find(:first, :conditions => ["email ILIKE ? OR display_name ILIKE ?", options[:username], options[:username]])
- else
- user = find(:first, :conditions => ["email = ? OR display_name = ?", options[:username], options[:username]])
- end
+ user = find(:first, :conditions => ["email = ? OR display_name = ?", options[:username], options[:username]])