Module: Code42::API::PasswordReset
- Included in:
- Client
- Defined in:
- lib/code42/api/password_reset.rb
Instance Method Summary collapse
-
#reset_password(username_or_id, view_url = nil) ⇒ Object
Send a password reset email to the user identified by
username_or_id.
Instance Method Details
#reset_password(username_or_id, view_url = nil) ⇒ Object
Send a password reset email to the user identified by username_or_id
7 8 9 10 11 12 |
# File 'lib/code42/api/password_reset.rb', line 7 def reset_password(username_or_id, view_url = nil) key = username_or_id.to_i > 0 ? :userId : :username params = { key => username_or_id } params.merge!(viewUrl: view_url) if view_url post("UserPasswordReset", params)['data']['success'] end |