Auxiliary script changes for testing in Prod 20240829
This commit is contained in:
parent
1856f822ba
commit
174e341973
@ -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
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user