# Load the Discourse environment require File.expand_path("../../../../config/environment", __FILE__) # require_relative '/var/www/discourse/config/environment' def query_md5_password_custom_field(username) user = User.find_by(username: username) if user md5_password = user.custom_fields['custom_password_md5'] if md5_password puts "MD5 password custom field for user #{username}: #{md5_password}" else puts "No MD5 password custom field set for user: #{username}" end puts "password_hash #{user.password_hash}" puts "password_algorithm #{user.password_algorithm}" puts "salt #{user.salt}" puts "active #{user.active}" puts "approved #{user.approved}" else puts "User not found: #{username}" end end # Replace 'username' with the actual username username = 'davidpaulyoung' query_md5_password_custom_field(username) username = 'Slowman' query_md5_password_custom_field(username) username = 'GT' query_md5_password_custom_field(username) username = 'Chimpking' query_md5_password_custom_field(username)