Method: ParseUser.reset_password

Defined in:
lib/parse_resource/parse_user.rb

.reset_password(email) ⇒ Object



48
49
50
51
52
53
54
55
56
57
58
59
60
# File 'lib/parse_resource/parse_user.rb', line 48

def self.reset_password(email)
    base_uri   = "https://api.parse.com/1/requestPasswordReset"
    app_id     = settings['app_id']
    master_key = settings['master_key']
    resource = RestClient::Resource.new(base_uri, app_id, master_key)

    begin
      resp = resource.post({:email => email}.to_json, :content_type => 'application/json')
      true
    rescue
      false
    end
end