modules
[ class tree: modules ] [ index: modules ] [ all elements ]

Class: posixAccount

Source Location: /lib/modules/posixAccount.inc

Class Overview

baseModule
   |
   --posixAccount

Manages the object class "posixAccount" for users and hosts.


Methods


Inherited Variables

Inherited Methods

Class: baseModule

baseModule::baseModule()
Creates a new base module class
baseModule::build_uploadAccounts()
In this function the LDAP account is built up.
baseModule::can_manage()
Returns true if this module fits for the current scope.
baseModule::checkSelfServiceOptions()
Checks if all input values are correct and returns the LDAP commands which should be executed.
baseModule::checkSelfServiceSettings()
Checks if the self service settings are valid.
baseModule::check_configOptions()
Checks input values of module settings.
baseModule::check_profileOptions()
Checks input values of account profiles.
baseModule::delete_attributes()
Dummy function for modules which use no special options on account deletion.
baseModule::display_html_delete()
Dummy function for modules which do not print extra HTML code on account deletion.
baseModule::doUploadPostActions()
This function executes one post upload action.
baseModule::getAccountContainer()
Returns the accountContainer object.
baseModule::getAttributes()
Returns the LDAP attributes which are managed in this module.
baseModule::getButtonStatus()
Controls if the module button the account page is visible and activated.
baseModule::getLDAPAliases()
Returns a list of aliases for LDAP attributes.
baseModule::getManagedAttributes()
Returns a list of LDAP attributes which are managed by this module.
baseModule::getManagedObjectClasses()
Returns a list of managed object classes for this module.
baseModule::getOriginalAttributes()
Returns the LDAP attributes which are managed in this module (with unchanged values).
baseModule::getRequiredExtensions()
Returns a list of required PHP extensions.
baseModule::getSelfServiceFields()
Returns a list of possible input fields and their descriptions Format: array(<field identifier> => <field description>)
baseModule::getSelfServiceOptions()
Returns the meta HTML code for each input field.
baseModule::getSelfServiceSearchAttributes()
Returns a list of possible search attributes for the self service.
baseModule::getSelfServiceSettings()
Returns a list of self service configuration settings.
baseModule::get_alias()
Returns an alias name for the module.
baseModule::get_configOptions()
Returns a list of elements for the configuration.
baseModule::get_dependencies()
This function returns a list with all depending and conflicting modules.
baseModule::get_help()
This function return the help entry array for a specific help id. Normally this->meta can be used.
baseModule::get_ldap_filter()
returns an LDAP filter for the account lists
baseModule::get_metaData()
Dummy function, meta data is provided by sub classes.
baseModule::get_pdfFields()
Returns an array with all fields available for this account type on the PDF output. This method may be overwritten by subclasses or it may be used by using entries in the $this->meta['PDF_fields'] array of the specific sub- class.
baseModule::get_pdf_entries()
Returns a hastable with all entries that may be printed out in the PDF. The
baseModule::get_profileOptions()
Returns a list of elements for the account profiles.
baseModule::get_RDNAttributes()
Returns a list of possible LDAP attributes which can be used to form the RDN.
baseModule::get_scope()
Returns the account type of this module (user, group, host)
baseModule::get_uploadColumns()
Returns an array containing all input columns for the file upload.
baseModule::get_uploadPreDepends()
Returns a list of module names which must be processed in building the account befor this module.
baseModule::init()
Initializes the module after it became part of an accountContainer
baseModule::is_base_module()
Returns true if this module is enough to provide a sensible account.
baseModule::load_attributes()
This function loads the LDAP attributes for this module.
baseModule::load_Messages()
This function fills the $messages variable with output messages from this module.
baseModule::load_profile()
Loads the values of an account profile into internal variables.
baseModule::module_complete()
This functions is used to check if all settings for this module have been made.
baseModule::module_ready()
This function is used to check if this module page can be displayed.
baseModule::postDeleteActions()
Allows the module to run commands after the LDAP entry is deleted.
baseModule::postModifyActions()
Allows the module to run commands after the LDAP entry is changed or created.
baseModule::preDeleteActions()
Allows the module to run commands before the LDAP entry is deleted.
baseModule::preModifyActions()
Allows the module to run commands before the LDAP entry is changed or created.
baseModule::save_attributes()
Returns a list of modifications which have to be made to the LDAP account.

Class Details

[line 40]
Manages the object class "posixAccount" for users and hosts.



[ Top ]


Class Methods


method build_uploadAccounts [line 1254]

array build_uploadAccounts( array $rawAccounts, array $ids, &$partialAccounts, array $partialAccounts)

In this function the LDAP account is built up.



Tags:

return:  list of error messages if any


Overrides baseModule::build_uploadAccounts() (In this function the LDAP account is built up.)

Parameters:

array   $rawAccounts   list of hash arrays (name => value) from user input
array   $partialAccounts   list of hash arrays (name => value) which are later added to LDAP
array   $ids   list of IDs for column position (e.g. "posixAccount_uid" => 5)
   &$partialAccounts  

[ Top ]

method checkASCII [line 853]

string checkASCII( string $attribute)

Checks if an attribute contains only ASCII charaters and replaces invalid characters.



Tags:

return:  attribute value with replaced non-ASCII characters


Parameters:

string   $attribute   attribute value

[ Top ]

method checkSelfServiceOptions [line 1698]

array checkSelfServiceOptions( string $fields, array $attributes)

Checks if all input values are correct and returns the LDAP commands which should be executed.



Tags:

return:  messages and LDAP commands (array('messages' => array(), 'add' => array(), 'del' => array(), 'mod' => array()))


Overrides baseModule::checkSelfServiceOptions() (Checks if all input values are correct and returns the LDAP commands which should be executed.)

Parameters:

string   $fields   input fields
array   $attributes   LDAP attributes

[ Top ]

method check_configOptions [line 1195]

array check_configOptions( array $scopes, array $options)

Checks input values of module settings.



Tags:

return:  list of error messages


Overrides baseModule::check_configOptions() (Checks input values of module settings.)

Parameters:

array   $scopes   list of account types which are used
array   $options   hash array containing the settings (array('option' => array('value')))

[ Top ]

method delete_attributes [line 574]

List delete_attributes( )

Additional LDAP operations on delete.



Tags:

return:  of LDAP operations, same as for save_attributes()


Overrides baseModule::delete_attributes() (Dummy function for modules which use no special options on account deletion.)

[ Top ]

method display_html_attributes [line 918]

array display_html_attributes( )

Returns the HTML meta data for the main account page.



Tags:

return:  HTML meta data


[ Top ]

method display_html_delete [line 1024]

meta display_html_delete( )

Displays the delete homedir option for the delete page.



Tags:

return:  HTML code


Overrides baseModule::display_html_delete() (Dummy function for modules which do not print extra HTML code on account deletion.)

[ Top ]

method display_html_group [line 1039]

array display_html_group( )

Displays the group selection.



Tags:

return:  meta HTML code


[ Top ]

method display_html_password [line 1084]

array display_html_password( )

Displays the password changing dialog.



Tags:

return:  meta HTML code


[ Top ]

method doUploadPostActions [line 1506]

array doUploadPostActions( array $data, array $ids, array $failed, &$temp, array $temp)

This function executes one post upload action.



Tags:

return:  current status
array (
'status' => 'finished' | 'inProgress'
'progress' => 0..100
'errors' => array (<array of parameters for StatusMessage>)
)


Overrides baseModule::doUploadPostActions() (This function executes one post upload action.)

Parameters:

array   $data   array containing one account in each element
array   $ids   array(<column_name> => <column number>)
array   $failed   list of accounts which were not created successfully
array   $temp   variable to store temporary data between two post actions
   &$temp  

[ Top ]

method getClearTextPassword [line 1727]

string getClearTextPassword( )

Returns the clear text password.



Tags:

return:  password
access:  public


[ Top ]

method getNextUIDs [line 1612]

mixed getNextUIDs( integer $count, &$errors, array $errors)

Returns one or more free UID numbers.



Tags:

return:  Null if no UIDs are free else an array of free UIDs.


Parameters:

integer   $count   Number of needed free UIDs.
array   $errors   list of error messages where errors can be added
   &$errors  

[ Top ]

method getSelfServiceOptions [line 1678]

array getSelfServiceOptions( array $fields, array $attributes)

Returns the meta HTML code for each input field.

format: array(<field1> => array(<META HTML>), ...) It is not possible to display help links.




Tags:

return:  meta HTML


Overrides baseModule::getSelfServiceOptions() (Returns the meta HTML code for each input field.)

Parameters:

array   $fields   list of active fields
array   $attributes   attributes of LDAP account (attribute names in lower case)

[ Top ]

method get_metaData [line 102]

array get_metaData( )

Returns meta data that is interpreted by parent class



Tags:

return:  array with meta data


Overrides baseModule::get_metaData() (Dummy function, meta data is provided by sub classes.)

[ Top ]

method get_pdfEntries [line 1170]

array get_pdfEntries( )

Returns the PDF entries for this module.



Tags:

return:  list of possible PDF entries


[ Top ]

method get_profileOptions [line 1106]

profile get_profileOptions( )

Returns a list of elements for the account profiles.



Tags:

return:  elements


Overrides baseModule::get_profileOptions() (Returns a list of elements for the account profiles.)

[ Top ]

method init [line 428]

void init( string $base)

Initializes the module after it became part of an accountContainer



Overrides baseModule::init() (Initializes the module after it became part of an accountContainer)

Parameters:

string   $base   the name of the accountContainer object ($_SESSION[$base])

[ Top ]

method load_attributes [line 460]

void load_attributes( array $attr)

This function loads all needed LDAP attributes.



Overrides baseModule::load_attributes() (This function loads the LDAP attributes for this module.)

Parameters:

array   $attr   list of attributes

[ Top ]

method load_Messages [line 54]

void load_Messages( )

This function fills the error message array with messages.



Overrides baseModule::load_Messages() (This function fills the $messages variable with output messages from this module.)

[ Top ]

method load_profile [line 1148]

void load_profile( array $profile)

Loads the values of an account profile into internal variables.



Overrides baseModule::load_profile() (Loads the values of an account profile into internal variables.)

Parameters:

array   $profile   hash array with profile values (identifier => value)

[ Top ]

method module_complete [line 446]

boolean module_complete( )

This functions is used to check if all settings for this module have been made.



Tags:

return:  true, if settings are complete


Overrides baseModule::module_complete() (This functions is used to check if all settings for this module have been made.)

[ Top ]

method postModifyActions [line 536]

void postModifyActions( boolean $newAccount)

Allows the module to run commands after the LDAP entry was changed or created.



Overrides baseModule::postModifyActions() (Allows the module to run commands after the LDAP entry is changed or created.)

Parameters:

boolean   $newAccount   new account

[ Top ]

method preDeleteActions [line 592]

true, preDeleteActions( )

Allows the module to run commands before the LDAP entry is deleted.

An error message should be printed if the function returns false.




Tags:

return:  if no problems occured


Overrides baseModule::preDeleteActions() (Allows the module to run commands before the LDAP entry is deleted.)

[ Top ]

method process_attributes [line 626]

array process_attributes( )

Processes user input of the primary module page.

It checks if all input values are correct and updates the associated LDAP attributes.




Tags:

return:  list of info/error messages


[ Top ]

method process_group [line 878]

array process_group( )

Processes user input of the group selection page.

It checks if all input values are correct and updates the associated LDAP attributes.




Tags:

return:  list of info/error messages


[ Top ]

method process_password [line 895]

array process_password( )

Processes user input of the password page.

It checks if all input values are correct and updates the associated LDAP attributes.




Tags:

return:  list of info/error messages


[ Top ]

method save_attributes [line 487]

array save_attributes( )

Returns a list of modifications which have to be made to the LDAP account.



Tags:

return:  list of modifications
This function returns an array with 3 entries:
array( DN1 ('add' => array($attr), 'remove' => array($attr), 'modify' => array($attr)), DN2 .... )
DN is the DN to change. It may be possible to change several DNs (e.g. create a new user and add him to some groups via attribute memberUid)
"add" are attributes which have to be added to LDAP entry
"remove" are attributes which have to be removed from LDAP entry
"modify" are attributes which have to been modified in LDAP entry


Overrides baseModule::save_attributes() (Returns a list of modifications which have to be made to the LDAP account.)

[ Top ]


Documentation generated on Sun, 04 Nov 2007 12:10:59 +0100 by phpDocumentor 1.4.0