Class: CFoundry::V1::User

Inherits:
Model
  • Object
show all
Defined in:
lib/cfoundry/v1/user.rb

Instance Attribute Summary

Attributes inherited from Model

#changes, #guid

Attributes included from ModelMagic

#guid_name

Instance Method Summary collapse

Methods inherited from Model

#base_object_name, #changed?, #create!, #delete!, #eql?, #exists?, #find_path, #guid_name, #hash, #initialize, #inspect, #invalidate!, #manifest, #object_name, #put, #read_manifest, #update!, #write_manifest

Methods included from ModelMagic

#attribute, #define_client_methods, #read_locations, #write_locations

Constructor Details

This class inherits a constructor from CFoundry::V1::Model

Instance Method Details

#change_password!(new, old) ⇒ Object



13
14
15
16
17
18
19
20
# File 'lib/cfoundry/v1/user.rb', line 13

def change_password!(new, old)
  if @client.base.uaa
    @client.base.uaa.change_password(guid, new, old)
  else
    self.password = new
    update!
  end
end