Auxiliary script changes for testing in Prod 20240829

This commit is contained in:
David Sainty 2024-08-29 20:46:26 +10:00
parent 1856f822ba
commit 174e341973
2 changed files with 2 additions and 2 deletions

View File

@ -6,7 +6,7 @@ require File.expand_path("../../../../config/environment", __FILE__)
def query_md5_password_custom_field(username) def query_md5_password_custom_field(username)
user = User.find_by(username: username) user = User.find_by(username: username)
if user if user
md5_password = user.custom_fields['custom_password_md5'] md5_password = user.custom_fields['md5_password']
if md5_password if md5_password
puts "MD5 password custom field for user #{username}: #{md5_password}" puts "MD5 password custom field for user #{username}: #{md5_password}"
else else

View File

@ -6,7 +6,7 @@ require File.expand_path("../../../../config/environment", __FILE__)
def set_md5_password_custom_field(username, md5_password) def set_md5_password_custom_field(username, md5_password)
user = User.find_by(username: username) user = User.find_by(username: username)
if user if user
user.custom_fields['custom_password_md5'] = md5_password user.custom_fields['md5_password'] = md5_password
user.save! user.save!
puts "MD5 password custom field set for user: #{username}" puts "MD5 password custom field set for user: #{username}"
else else