LDAPAccountManager/lam/docs/devel/profile_editor.htm

90 lines
3.5 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-15"
http-equiv="content-type">
<title>Profile editor</title>
<link rel="stylesheet" type="text/css" href="style/layout.css">
</head>
<body>
<h1 style="text-align: center;">Profile editor<br>
</h1>
<div style="text-align: center;"><img alt="profile editor"
src="images/lam_profedit.png" style="width: 502px; height: 236px;"><br>
</div>
<div style="text-align: center;"><br>
<div style="text-align: left;">The <span style="font-style: italic;">profile
editor</span> allows the user to set default values for new accounts.<br>
These defaults are saved as files in <span style="font-weight: bold;">config/profiles</span>.<br>
<br>
<h2>Profilemain.php<br>
</h2>
This is the start page of the <span style="font-style: italic;">profile
editor</span>. The user can select to add/modify/remove selected
account profiles.<br>
<br>
The list of existing account profiles is returned by <span
style="font-weight: bold;">getAccountProfiles()</span> in <span
style="font-style: italic;">modules.inc</span>. It includes all
profile names without file extensions.<br>
<br>
<h2>Profilepage.php<br>
</h2>
This script is used to display the account profile to the user. <br>
<br>
The profile options include the LDAP OU suffix and options provided by
the account modules.<br>
<br>
The values for the OU selection are read with <span
style="font-weight: bold;">search_units()</span>.<br>
<br>
The <span style="font-style: italic;">account modules</span> provide
all other profile options. The profile editor displays a separate
fieldset for each module containing its options.<br>
The function <span style="font-weight: bold;">print_option()</span>
manages the display of the different option types (checkbox, select,
...). The type of each option is saved in <span
style="font-weight: bold;">$_SESSION['profile_types']</span>.<br>
See the <a href="modules-specification.htm">modules specification</a>
for a complete list of supported types.<br>
<br>
The profiles have unique names under which they are saved. If a profile
with the same name already exists it will be overwritten.<br>
When the user selects to save the profile he will be redirected to
profilecreate.php.<br>
<br>
<h2>Profilecreate.php</h2>
This script takes the values which were entered in profilepage.php and
checks them for correctness. <br>
<br>
First the values are converted to the correct type (checkbox -&gt;
Boolean) by checking <span style="font-weight: bold;">$_SESSION['profile_types']</span>.<br>
<br>
Then LAM will replace all "\'" with&nbsp; "'" if <span
style="font-style: italic;">magic_quotes_gpc</span> is on.<br>
<br>
Now the input data is checked for correctness by calling <span
style="font-weight: bold;">checkProfileOptions()</span>. The <span
style="font-style: italic;">account modules</span> return a list of
error messages if one or more options are incorrect.<br>
If there are errors they will be displayed, otherwise the profile is
saved by calling <span style="font-weight: bold;">saveAccountProfile()</span>.<br>
<br>
<h2>Profiledelete.php</h2>
When the user selected to delete a profile in <span
style="font-style: italic;">profilemain.php</span> he is redirected to
this page.<br>
<br>
LAM will ask once again if the user is sure to delete the profile. If
this is the case the profile will be deleted with <span
style="font-weight: bold;">delAccountProfile()</span> from <span
style="font-style: italic;">profiles.inc</span>.<br>
<br>
<br>
<br>
<br>
</div>
</div>
</body>
</html>