| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
| 2 | <html lang="en"> |
| 3 | <head> |
| 4 | <meta content="text/html; charset=ISO-8859-15" |
| 5 | http-equiv="content-type"> |
| 6 | <title>Account modules (modules.inc)</title> |
| 7 | <link rel="stylesheet" type="text/css" href="style/layout.css"> |
| 8 | <link rel="shortcut icon" type="image/x-icon" href="images/favicon.ico"> |
| 9 | </head> |
| 10 | <body> |
| 11 | <h1 style="text-align: center;">Account modules (modules.inc)<br> |
| 12 | </h1> |
| 13 | <br> |
| 14 | <span style="font-style: italic;">Modules.inc</span> provides the |
| 15 | interface to all module specific functions. It includes a list of |
| 16 | account independent function and the <span style="font-weight: bold;">accountContainer</span> |
| 17 | class. This class represents an LDAP account.<br> |
| 18 | You should never call module functions directly, always use a function |
| 19 | in <span style="font-style: italic;">modules.inc</span>.<br> |
| 20 | <br> |
| 21 | <h2>Account independent functions:</h2> |
| 22 | <br> |
| 23 | <h3>General functions:</h3> |
| 24 | <span style="font-weight: bold;">getModuleAlias:</span> This returns |
| 25 | the alias name of a module. It is used to label buttons or fieldsets.<br> |
| 26 | <br> |
| 27 | <span style="font-weight: bold;">parseHtml:</span> Converts the LAM |
| 28 | meta HTML code to real HTML code.<br> |
| 29 | <span style="font-weight: bold;"></span><br> |
| 30 | <br> |
| 31 | <h3>Functions for LAM configuration:</h3> |
| 32 | <span style="font-weight: bold;">is_base_module:</span> When the given |
| 33 | module is a <span style="font-style: italic;">base module</span> then |
| 34 | this returns <span style="font-style: italic;">true</span>. Every |
| 35 | account type needs exactly one <span style="font-style: italic;">base |
| 36 | module</span>.<br> |
| 37 | <br> |
| 38 | <span style="font-weight: bold;">getModulesDependencies:</span> Account |
| 39 | modules can specify dependencies to other modules. E.g. Samba accounts |
| 40 | always need a Unix part.<br> |
| 41 | <br> |
| 42 | <span style="font-weight: bold;">check_module_depends/check_module_conflicts:</span> |
| 43 | This function checks if all module dependencies are satisfied.<br> |
| 44 | <br> |
| 45 | <span style="font-weight: bold;">getAvailableModules:</span> Returns a |
| 46 | list of available modules. If you need a list of all active modules use |
| 47 | <span style="font-weight: bold;">$_SESSION['config']-></span><span |
| 48 | class="method-title"><span style="font-weight: bold;">get_AccountModules()</span>.</span><br> |
| 49 | <br> |
| 50 | <span style="font-weight: bold;">getConfigOptions:</span> Returns a |
| 51 | list of all configuration options which were defined by the modules.<br> |
| 52 | <br> |
| 53 | <span style="font-weight: bold;">getConfigDescriptions:</span> Returns |
| 54 | a list of all configuration descriptions and titles for the fieldsets.<br> |
| 55 | <br> |
| 56 | <span style="font-weight: bold;">checkConfigOptions:</span> Checks if |
| 57 | the user filled in valid values for each option.<br> |
| 58 | <br> |
| 59 | <br> |
| 60 | <h3>Account list functions:</h3> |
| 61 | <span style="font-weight: bold;">get_ldap_filter:</span> Each account |
| 62 | list shows only entries which match a given LDAP search filter.<br> |
| 63 | <br> |
| 64 | <br> |
| 65 | <h3>Profile/account pages:</h3> |
| 66 | <span style="font-weight: bold;">getRDNAttributes:</span> This returns |
| 67 | a list of possible LDAP <span style="font-style: italic;">RDN</span> |
| 68 | attributes. LAM needs this to build the <span |
| 69 | style="font-style: italic;">DN</span> for new accounts.<br> |
| 70 | <br> |
| 71 | <span style="font-weight: bold;">getProfileOptions:</span> Returns a |
| 72 | list of all profile options which were defined by the account modules.<br> |
| 73 | <br> |
| 74 | <span style="font-weight: bold;">checkProfileOptions:</span> Checks if |
| 75 | all module options are correct.<br> |
| 76 | <br> |
| 77 | <br> |
| 78 | <h3>Help functions:</h3> |
| 79 | <span style="font-weight: bold;">getHelp:</span> Returns a module help |
| 80 | entry.<br> |
| 81 | <br> |
| 82 | <br> |
| 83 | <h3>PDF functions:</h3> |
| 84 | <span style="font-weight: bold;">getAvailablePDFFields:</span> Returns |
| 85 | a list of possible PDF fields.<br> |
| 86 | <br> |
| 87 | <br> |
| 88 | <h3>Upload functions:</h3> |
| 89 | <span style="font-weight: bold;">getUploadColumns:</span> Returns a |
| 90 | list of possible upload columns and additional information like a |
| 91 | description, help entry and example value.<br> |
| 92 | <br> |
| 93 | <span style="font-weight: bold;">buildUploadAccounts:</span> Takes the |
| 94 | input of the CSV file and builds the LDAP accounts.<br> |
| 95 | <br> |
| 96 | <span style="font-weight: bold;">doUploadPostActions:</span> Manages |
| 97 | the execution of actions which need to be done after the accounts are |
| 98 | created.<br> |
| 99 | <br> |
| 100 | <br> |
| 101 | <h2>Class accountContainer:</h2> |
| 102 | This class represents a complete LDAP account. It manages all functions |
| 103 | which concern a specific LDAP entry.<br> |
| 104 | <br> |
| 105 | <h4>Important variables:</h4> |
| 106 | There are some class variables which can be of important use in the |
| 107 | account modules.<br> |
| 108 | <br> |
| 109 | <span style="font-weight: bold;">module:</span> List of account modules |
| 110 | (array('name' => 'object')).<br> |
| 111 | <br> |
| 112 | <span style="font-weight: bold;">isNewAccount:</span> This variable is <span |
| 113 | style="font-style: italic;">true</span> when the account is newly |
| 114 | created, <span style="font-style: italic;">false</span> if loaded from |
| 115 | LDAP.<br> |
| 116 | <br> |
| 117 | <h4>Function list:</h4> |
| 118 | <span style="font-weight: bold;">continue_main:</span> This function is |
| 119 | called when an account page is displayed. It generates the HTML code |
| 120 | for the account pages.<br> |
| 121 | <br> |
| 122 | <span style="font-weight: bold;"></span><span style="font-weight: bold;">save_module_attributes:</span> |
| 123 | Finds |
| 124 | differences between current and original account.<br> |
| 125 | <br> |
| 126 | <span style="font-weight: bold;">load_account:</span> Loads an LDAP |
| 127 | account.<br> |
| 128 | <br> |
| 129 | <span style="font-weight: bold;">new_account:</span> Creates a new |
| 130 | account.<br> |
| 131 | <br> |
| 132 | <span style="font-weight: bold;">save_account:</span> Saves an account |
| 133 | to LDAP.<br> |
| 134 | <br> |
| 135 | <span style="font-weight: bold;">get_pdfEntries:</span> Returns the PDF |
| 136 | values of an account.<br> |
| 137 | <br> |
| 138 | <br> |
| 139 | <br> |
| 140 | </body> |
| 141 | </html> |