2024-06-17 09:45:51 +00:00
|
|
|
# Load the Discourse environment
|
2024-08-29 10:09:26 +00:00
|
|
|
require File.expand_path("../../../../config/environment", __FILE__)
|
2024-06-17 09:45:51 +00:00
|
|
|
|
|
|
|
# require_relative '/var/www/discourse/config/environment'
|
|
|
|
|
|
|
|
def query_md5_password_custom_field(username)
|
|
|
|
user = User.find_by(username: username)
|
|
|
|
if user
|
2024-08-29 10:46:26 +00:00
|
|
|
md5_password = user.custom_fields['md5_password']
|
2024-06-17 09:45:51 +00:00
|
|
|
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)
|
2024-08-29 10:09:26 +00:00
|
|
|
|
|
|
|
username = 'Slowman'
|
|
|
|
|
|
|
|
query_md5_password_custom_field(username)
|
|
|
|
|
|
|
|
username = 'GT'
|
|
|
|
|
|
|
|
query_md5_password_custom_field(username)
|
|
|
|
|
|
|
|
username = 'Chimpking'
|
|
|
|
|
|
|
|
query_md5_password_custom_field(username)
|