modules

# Class: accountContainer

Source Location: /lib/modules.inc

### Class Overview

This class includes all modules and attributes of an account.

### Variables

- $attributes
- $attributes_orig
- $dnSuffix
- $dn_orig
- $finalDN
- $isNewAccount
- $rdn

### Methods

- __construct
- continue_main
- fixLDAPAttributes
- getAccountModule
- getAccountModules
- getParentDN
- getRDN
- get_pdfEntries
- get_type
- load_account
- new_account
- save_account
- save_module_attributes
- setNewPassword
- sortModules
- __sleep
- __wakeup

### Class Details

[line 632]
This class includes all modules and attributes of an account.
[ Top ]

### Class Variables

#### $attributes =

[line 661]

Array of all used attributes

Syntax is attribute => array ( objectClass => MUST or MAY, ...)

#### Tags:

access: | public

Type: | mixed

[ Top ]

#### $attributes_orig =

[line 685]

original LDAP attributes when account was loaded from LDAP

#### Tags:

access: | public

Type: | mixed

[ Top ]

#### $dnSuffix =

[line 673]

DN suffix of the account

#### Tags:

access: | public

Type: | mixed

[ Top ]

#### $dn_orig =

[line 676]

DN of account when it was loaded

#### Tags:

access: | public

Type: | mixed

[ Top ]

#### $finalDN =

[line 682]

DN of saved account

#### Tags:

access: | public

Type: | mixed

[ Top ]

#### $isNewAccount =

[line 700]

True if this is a newly created account

#### Tags:

access: | public

Type: | mixed

[ Top ]

#### $rdn =

[line 679]

RDN attribute of this account

#### Tags:

access: | public

Type: | mixed

[ Top ]

### Class Methods

### constructor __construct [line 640]

`accountContainer __construct( string $type, string $base)`

Constructor

#### Parameters:

string | $type | account type
string | $base | key in $_SESSION where this object is saved

[ Top ]

### method continue_main [line 750]

`void continue_main( )`

This function is called when the user clicks on any button on the account pages.

It prints the HTML code of each account page.

[ Top ]

### method fixLDAPAttributes [line 1473]

`array fixLDAPAttributes( array $attributes, array $modules)`

Fixes spelling errors in the attribute names.

#### Tags:

return: | fixed attributes

#### Parameters:

array | $attributes | LDAP attributes
array | $modules | list of active modules

[ Top ]

### method getAccountModule [line 719]

`baseModule getAccountModule( string $name)`

Returns the account module with the given class name

#### Tags:

return: | account module

#### Parameters:

string | $name | class name (e.g. posixAccount)

[ Top ]

### method getAccountModules [line 733]

`array getAccountModules( )`

Returns the included account modules.

#### Tags:

return: | modules

[ Top ]

### method getParentDN [line 1888]

`String getParentDN( String $dn)`

Returns the parent DN of a given DN.

#### Tags:

return: | DN

#### Parameters:

String | $dn | DN

[ Top ]

### method getRDN [line 1876]

`String getRDN( String $dn)`

Returns the RDN part of a given DN.

#### Tags:

return: | RDN

#### Parameters:

String | $dn | DN

[ Top ]

### method get_pdfEntries [line 1778]

`list get_pdfEntries( )`

Returns a list of possible PDF entries for this account.

#### Tags:

return: | of PDF entries (array(<name> => <PDF lines>))

[ Top ]

### method get_type [line 742]

`string get_type( )`

Returns the accout type of this object (e.g. user, group, host).

#### Tags:

return: | account type

[ Top ]

### method load_account [line 1410]

`array load_account( string $dn, [array $infoAttributes = array()])`

Loads an LDAP account with the given DN.

#### Tags:

return: | error messages

#### Parameters:

string | $dn | the DN of the account
array | $infoAttributes | list of additional informational attributes that are added to the LDAP attributes E.g. this is used to inject the clear text password in the file upload. Informational attribute names must start with "INFO.".

[ Top ]

### method new_account [line 1546]

`void new_account( )`

This function will prepare the object for a new account.
[ Top ]

### method save_account [line 1581]

`array save_account( )`

This function will save an account to the LDAP database.

#### Tags:

return: | list of status messages

[ Top ]

### method save_module_attributes [line 1329]

`array save_module_attributes( array $attributes, array $orig)`

This function checks which LDAP attributes have changed while the account was edited.

#### Tags:

return: | an array which can be passed to $this->saveAccount()

#### Parameters:

array | $attributes | list of current LDAP attributes
array | $orig | list of old attributes when account was loaded

[ Top ]

### method setNewPassword [line 1031]

`void setNewPassword( array $input)`

Sets the new password in all selected account modules.

#### Tags:

access: | public

#### Parameters:

array | $input | input parameters

[ Top ]

### method sortModules [line 1795]

`void sortModules( )`

Sorts the module buttons for the account page.
[ Top ]

### method __sleep [line 1914]

`array __sleep( )`

Encrypts sensitive data before storing in session.

#### Tags:

return: | list of attributes which are serialized

[ Top ]

### method __wakeup [line 1926]

`void __wakeup( )`

Decrypts sensitive data after accountContainer was loaded from session.
[ Top ]

Documentation generated on Sun, 25 Mar 2012 19:35:48 +0200 by phpDocumentor 1.4.1