From 98814a195750017ae7204dfbf3d0f25cdfe77588 Mon Sep 17 00:00:00 2001 From: saint Date: Wed, 9 Oct 2024 03:29:35 +1100 Subject: [PATCH] goss-resetpw.rb v0.1 -- for Lance, etc to reset passwords --- goss-resetpw.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/goss-resetpw.rb b/goss-resetpw.rb index b53ebd0..83a02c8 100644 --- a/goss-resetpw.rb +++ b/goss-resetpw.rb @@ -16,15 +16,15 @@ class GossamerResetPassword # Delete Gossamer MD5 Password user.custom_fields.delete('md5_password') # This removes the field completely user.save! - puts " STEP 1 COMPLETED: Gossamer MD5 Password custom field removed for username: #{username}" + puts " STEP 1 COMPLETED: Gossamer MD5 Password custom field removed for username: #{discourse_username}" # Set the Discourse password with the `password=` method to properly hash the password user.password = new_password user.save! - puts " STEP 2 COMPLETED: Discourse Password updated for user: #{username}" + puts " STEP 2 COMPLETED: Discourse Password updated for username: #{discourse_username}" else - puts "User not found: #{username}" + puts "User not found: #{discourse_username}" end end end