Module: Tapjoy::LDAP::API::User
- Extended by:
- Memoist
- Defined in:
- lib/tapjoy/ldap/api/user.rb
Class Method Summary collapse
- .create(fname, lname, type, group) ⇒ Object
- .destroy(username, type) ⇒ Object
- .index ⇒ Object
- .show(username) ⇒ Object
Class Method Details
.create(fname, lname, type, group) ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/tapjoy/ldap/api/user.rb', line 8 def create(fname, lname, type, group) # Properly capitalize names fname, lname = [fname, lname].map(&:capitalize) Tapjoy::LDAP.client.add( distinguished_name(fname, lname, type), ldap_attr(fname, lname, type, group) ) end |
.destroy(username, type) ⇒ Object
18 19 20 21 22 |
# File 'lib/tapjoy/ldap/api/user.rb', line 18 def destroy(username, type) Tapjoy::LDAP.client.delete( distinguished_name(*name_of_user(username), type) ) end |