This commit is contained in:
13
script/admin/reset-password
Executable file
13
script/admin/reset-password
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env ruby
|
||||
require File.expand_path("../../config/environment", File.dirname(__FILE__))
|
||||
|
||||
abort "Usage: #{$0} <email-address> <password>" unless ARGV.length == 2
|
||||
|
||||
email_address, password = ARGV
|
||||
if user = User.find_by(email_address: email_address)
|
||||
user.update!(password: password)
|
||||
puts "Password has been reset"
|
||||
else
|
||||
puts "User not found"
|
||||
exit -1
|
||||
end
|
||||
Reference in New Issue
Block a user