| 
									
										
										
										
											2004-12-12 11:46:19 +00:00
										 |  |  | <!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> | 
					
						
							| 
									
										
										
										
											2005-07-12 15:52:15 +00:00
										 |  |  | <div style="text-align: center;"><img alt="" | 
					
						
							|  |  |  |  src="images/lam_profedit.png" style="width: 354px; height: 236px;"><br> | 
					
						
							| 
									
										
										
										
											2004-12-12 11:46:19 +00:00
										 |  |  | </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> | 
					
						
							| 
									
										
										
										
											2005-07-07 17:35:33 +00:00
										 |  |  | See the <a href="modules-specification.htm">modules specification</a> | 
					
						
							| 
									
										
										
										
											2004-12-12 11:46:19 +00:00
										 |  |  | 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> | 
					
						
							|  |  |  | <br> | 
					
						
							| 
									
										
										
										
											2005-07-12 15:52:15 +00:00
										 |  |  | When the user selects to save the profile then | 
					
						
							|  |  |  | profilepage.php will check the input for correctness.<br> | 
					
						
							| 
									
										
										
										
											2004-12-12 11:46:19 +00:00
										 |  |  | First the values are converted to the correct type (checkbox -> | 
					
						
							| 
									
										
										
										
											2005-07-12 15:52:15 +00:00
										 |  |  | Boolean) by checking <span style="font-weight: bold;">$_SESSION['profile_types']</span>. | 
					
						
							| 
									
										
										
										
											2004-12-12 11:46:19 +00:00
										 |  |  | Then LAM will replace all "\'" with  "'" if <span | 
					
						
							| 
									
										
										
										
											2005-07-12 15:52:15 +00:00
										 |  |  |  style="font-style: italic;">magic_quotes_gpc</span> is on. Now the | 
					
						
							|  |  |  | input data is checked for correctness by calling <span | 
					
						
							|  |  |  |  style="font-weight: bold;">checkProfileOptions()</span>.<br> | 
					
						
							|  |  |  | The <span style="font-style: italic;">account modules</span> return a | 
					
						
							|  |  |  | list of | 
					
						
							|  |  |  | error messages if one or more options are incorrect. If there are | 
					
						
							|  |  |  | errors they will be displayed, otherwise the profile is | 
					
						
							| 
									
										
										
										
											2004-12-12 11:46:19 +00:00
										 |  |  | 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> |