File: _lib---selfService.inc.html

package info (click to toggle)
ldap-account-manager 3.7-2
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 34,660 kB
  • sloc: php: 49,813; perl: 305; makefile: 169; sh: 156; pascal: 132; xml: 111
file content (520 lines) | stat: -rw-r--r-- 19,772 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
<html>
<head>
<title>Docs for page selfService.inc</title>
<link rel="stylesheet" type="text/css" href="../media/style.css">
</head>
<body>

<table border="0" cellspacing="0" cellpadding="0" height="48" width="100%">
  <tr>
    <td class="header_top">selfService</td>
  </tr>
  <tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt=""  /></td></tr>
  <tr>
    <td class="header_menu">
        
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                      		  [ <a href="../classtrees_selfService.html" class="menu">class tree: selfService</a> ]
		  [ <a href="../elementindex_selfService.html" class="menu">index: selfService</a> ]
		  	    [ <a href="../elementindex.html" class="menu">all elements</a> ]
    </td>
  </tr>
  <tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt=""  /></td></tr>
</table>

<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="200" class="menu">
	<div id="ric">
					<p><a href="../ric_README.html">README</a></p>
			</div>
	<div id="todolist">
			<p><a href="../todolist.html">Todo List</a></p>
	</div>
      <b>Packages:</b><br />
              <a href="../li_main.html">main</a><br />
              <a href="../li_configuration.html">configuration</a><br />
              <a href="../li_Crypt_AES.html">Crypt_AES</a><br />
              <a href="../li_Crypt_DES.html">Crypt_DES</a><br />
              <a href="../li_Crypt_Hash.html">Crypt_Hash</a><br />
              <a href="../li_Crypt_Random.html">Crypt_Random</a><br />
              <a href="../li_Crypt_RC4.html">Crypt_RC4</a><br />
              <a href="../li_Crypt_Rijndael.html">Crypt_Rijndael</a><br />
              <a href="../li_Crypt_RSA.html">Crypt_RSA</a><br />
              <a href="../li_Crypt_TerraDES.html">Crypt_TerraDES</a><br />
              <a href="../li_Crypt_TripleDES.html">Crypt_TripleDES</a><br />
              <a href="../li_default.html">default</a><br />
              <a href="../li_Help.html">Help</a><br />
              <a href="../li_horde-cipher.html">horde-cipher</a><br />
              <a href="../li_lam.html">lam</a><br />
              <a href="../li_LDAP.html">LDAP</a><br />
              <a href="../li_lib.html">lib</a><br />
              <a href="../li_lists.html">lists</a><br />
              <a href="../li_Math_BigInteger.html">Math_BigInteger</a><br />
              <a href="../li_metaHTML.html">metaHTML</a><br />
              <a href="../li_modules.html">modules</a><br />
              <a href="../li_Net_SFTP.html">Net_SFTP</a><br />
              <a href="../li_Net_SSH1.html">Net_SSH1</a><br />
              <a href="../li_Net_SSH2.html">Net_SSH2</a><br />
              <a href="../li_PDF.html">PDF</a><br />
              <a href="../li_phpLDAPadmin.html">phpLDAPadmin</a><br />
              <a href="../li_PHP_Compat.html">PHP_Compat</a><br />
              <a href="../li_profiles.html">profiles</a><br />
              <a href="../li_selfService.html">selfService</a><br />
              <a href="../li_tools.html">tools</a><br />
              <a href="../li_types.html">types</a><br />
            <br /><br />
                        <b>Files:</b><br />
      	  <div class="package">
			<a href="../selfService/_lib---selfService.inc.html">		selfService.inc
		</a><br>
	  </div><br />
      
      
            <b>Classes:</b><br />
        <div class="package">
		    		<a href="../selfService/selfServiceProfile.html">selfServiceProfile</a><br />
	  </div>
                </td>
    <td>
      <table cellpadding="10" cellspacing="0" width="100%" border="0"><tr><td valign="top">

<h1>Procedural File: selfService.inc</h1>
Source Location: /lib/selfService.inc<br /><br />

<br>
<br>

<div class="contents">
<h2>Classes:</h2>
<dt><a href="../selfService/selfServiceProfile.html">selfServiceProfile</a></dt>
	<dd>Includes all settings of a self service profile.</dd>
</div><br /><br />

<h2>Page Details:</h2>
Interface between modules and self service pages.<br /><br /><p>This file also includes the self service profile class and helper functions.</p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>author:</b>&nbsp;&nbsp;</td><td>Roland Gruber</td>
  </tr>
</table>
</div>
<br /><br />
<h4>Includes:</h4>
<div class="tags">
include_once(<a href="../types/_lib---types.inc.html">"types.inc"</a>) [line 36]<br />
account types<br /><br />include_once(<a href="../modules/_lib---modules.inc.html">"modules.inc"</a>) [line 34]<br />
modules<br /><br /></div>
<br /><br />
<br /><br />
<br />
  <hr />
	<a name="functioncheckSelfServiceOptions"></a>
	<h3>checkSelfServiceOptions <span class="smalllinenumber">[line 118]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>array checkSelfServiceOptions(
string $scope, string $fields, array $attributes, boolean $passwordChangeOnly)</code>
    </td></tr></table>
    </td></tr></table><br />

		Checks if all input values are correct and returns the LDAP commands which should be executed.<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>return:</b>&nbsp;&nbsp;</td><td>messages and LDAP commands (array('messages' =&gt; array(), 'add' =&gt; array(), 'del' =&gt; array(), 'mod' =&gt; array()))</td>
  </tr>
</table>
</div>
    <br /><br />
	
    		<h4>Parameters</h4>
    <table border="0" cellspacing="0" cellpadding="0">
		      <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$scope</b>&nbsp;&nbsp;</td>
        <td>account type</td>
      </tr>
		      <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$fields</b>&nbsp;&nbsp;</td>
        <td>input fields (array(&lt;moduleName&gt; =&gt; array(&lt;field1&gt;, &lt;field2&gt;, ...)))</td>
      </tr>
		      <tr>
        <td class="type">array&nbsp;&nbsp;</td>
        <td><b>$attributes</b>&nbsp;&nbsp;</td>
        <td>LDAP attributes</td>
      </tr>
		      <tr>
        <td class="type">boolean&nbsp;&nbsp;</td>
        <td><b>$passwordChangeOnly</b>&nbsp;&nbsp;</td>
        <td>indicates that the user is only allowed to change his password and no LDAP content is readable</td>
      </tr>
				</table>
    	<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
	</div>
  <hr />
	<a name="functioncheckSelfServiceSettings"></a>
	<h3>checkSelfServiceSettings <span class="smalllinenumber">[line 260]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>array checkSelfServiceSettings(
string $scope, array $options)</code>
    </td></tr></table>
    </td></tr></table><br />

		Checks if the self service settings are valid<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>return:</b>&nbsp;&nbsp;</td><td>list of error messages</td>
  </tr>
</table>
</div>
    <br /><br />
	
    		<h4>Parameters</h4>
    <table border="0" cellspacing="0" cellpadding="0">
		      <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$scope</b>&nbsp;&nbsp;</td>
        <td>account type</td>
      </tr>
		      <tr>
        <td class="type">array&nbsp;&nbsp;</td>
        <td><b>$options</b>&nbsp;&nbsp;</td>
        <td>hash array containing all options (name =&gt; array(...))</td>
      </tr>
				</table>
    	<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
	</div>
  <hr />
	<a name="functiongetSelfServiceFieldSettings"></a>
	<h3>getSelfServiceFieldSettings <span class="smalllinenumber">[line 75]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>array getSelfServiceFieldSettings(
string $scope)</code>
    </td></tr></table>
    </td></tr></table><br />

		Returns the field settings for the self service.<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>return:</b>&nbsp;&nbsp;</td><td>settings</td>
  </tr>
</table>
</div>
    <br /><br />
	
    		<h4>Parameters</h4>
    <table border="0" cellspacing="0" cellpadding="0">
		      <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$scope</b>&nbsp;&nbsp;</td>
        <td>account type</td>
      </tr>
				</table>
    	<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
	</div>
  <hr />
	<a name="functiongetSelfServiceOptions"></a>
	<h3>getSelfServiceOptions <span class="smalllinenumber">[line 96]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>array getSelfServiceOptions(
string $scope, array $fields, array $attributes, boolean $passwordChangeOnly)</code>
    </td></tr></table>
    </td></tr></table><br />

		Returns meta HTML code for each self service field.<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>return:</b>&nbsp;&nbsp;</td><td>meta HTML code (array(&lt;moduleName&gt; =&gt; htmlTableRow))</td>
  </tr>
</table>
</div>
    <br /><br />
	
    		<h4>Parameters</h4>
    <table border="0" cellspacing="0" cellpadding="0">
		      <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$scope</b>&nbsp;&nbsp;</td>
        <td>account type</td>
      </tr>
		      <tr>
        <td class="type">array&nbsp;&nbsp;</td>
        <td><b>$fields</b>&nbsp;&nbsp;</td>
        <td>input fields (array(&lt;moduleName&gt; =&gt; array(&lt;field1&gt;, &lt;field2&gt;, ...)))</td>
      </tr>
		      <tr>
        <td class="type">array&nbsp;&nbsp;</td>
        <td><b>$attributes</b>&nbsp;&nbsp;</td>
        <td>LDAP attributes (attribute names in lower case)</td>
      </tr>
		      <tr>
        <td class="type">boolean&nbsp;&nbsp;</td>
        <td><b>$passwordChangeOnly</b>&nbsp;&nbsp;</td>
        <td>indicates that the user is only allowed to change his password and no LDAP content is readable</td>
      </tr>
				</table>
    	<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
	</div>
  <hr />
	<a name="functiongetSelfServiceProfiles"></a>
	<h3>getSelfServiceProfiles <span class="smalllinenumber">[line 140]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>array getSelfServiceProfiles(
)</code>
    </td></tr></table>
    </td></tr></table><br />

		Returns a list of all available self service profiles (without .conf)<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>return:</b>&nbsp;&nbsp;</td><td>profile names (array(&lt;account type&gt; =&gt; array(&lt;profile1&gt;, &lt;profile2&gt;, ...)))</td>
  </tr>
</table>
</div>
    <br /><br />
	
    	<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
	</div>
  <hr />
	<a name="functiongetSelfServiceSearchAttributes"></a>
	<h3>getSelfServiceSearchAttributes <span class="smalllinenumber">[line 55]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>array getSelfServiceSearchAttributes(
string $scope)</code>
    </td></tr></table>
    </td></tr></table><br />

		Returns a list of possible search attributes for the self service.<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>return:</b>&nbsp;&nbsp;</td><td>attributes</td>
  </tr>
</table>
</div>
    <br /><br />
	
    		<h4>Parameters</h4>
    <table border="0" cellspacing="0" cellpadding="0">
		      <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$scope</b>&nbsp;&nbsp;</td>
        <td>account type</td>
      </tr>
				</table>
    	<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
	</div>
  <hr />
	<a name="functiongetSelfServiceSettings"></a>
	<h3>getSelfServiceSettings <span class="smalllinenumber">[line 243]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>array getSelfServiceSettings(
string $scope, <a href="../selfService/selfServiceProfile.html">selfServiceProfile</a> $profile)</code>
    </td></tr></table>
    </td></tr></table><br />

		Returns a hash array (module name =&gt; elements) of all module options for the configuration page.<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>return:</b>&nbsp;&nbsp;</td><td>configuration options</td>
  </tr>
</table>
</div>
    <br /><br />
	
    		<h4>Parameters</h4>
    <table border="0" cellspacing="0" cellpadding="0">
		      <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$scope</b>&nbsp;&nbsp;</td>
        <td>account type</td>
      </tr>
		      <tr>
        <td class="type"><a href="../selfService/selfServiceProfile.html">selfServiceProfile</a>&nbsp;&nbsp;</td>
        <td><b>$profile</b>&nbsp;&nbsp;</td>
        <td>currently edited profile</td>
      </tr>
				</table>
    	<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
	</div>
  <hr />
	<a name="functionisLAMProVersion"></a>
	<h3>isLAMProVersion <span class="smalllinenumber">[line 43]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>boolean isLAMProVersion(
)</code>
    </td></tr></table>
    </td></tr></table><br />

		Returns if this is a LAM Pro installation.<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>return:</b>&nbsp;&nbsp;</td><td>LAM Pro installation</td>
  </tr>
</table>
</div>
    <br /><br />
	
    	<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
	</div>
  <hr />
	<a name="functionisSelfServiceProfileWritable"></a>
	<h3>isSelfServiceProfileWritable <span class="smalllinenumber">[line 228]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>boolean isSelfServiceProfileWritable(
string $name, string $scope)</code>
    </td></tr></table>
    </td></tr></table><br />

		Checks if a service profile is writable.<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>return:</b>&nbsp;&nbsp;</td><td>true if file is writable</td>
  </tr>
</table>
</div>
    <br /><br />
	
    		<h4>Parameters</h4>
    <table border="0" cellspacing="0" cellpadding="0">
		      <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$name</b>&nbsp;&nbsp;</td>
        <td>profile name</td>
      </tr>
		      <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$scope</b>&nbsp;&nbsp;</td>
        <td>account type</td>
      </tr>
				</table>
    	<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
	</div>
  <hr />
	<a name="functionloadSelfServiceProfile"></a>
	<h3>loadSelfServiceProfile <span class="smalllinenumber">[line 167]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../selfService/selfServiceProfile.html">selfServiceProfile</a> loadSelfServiceProfile(
string $name, string $scope)</code>
    </td></tr></table>
    </td></tr></table><br />

		Loads all settings of a self service profile.<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>return:</b>&nbsp;&nbsp;</td><td>true if file was readable</td>
  </tr>
</table>
</div>
    <br /><br />
	
    		<h4>Parameters</h4>
    <table border="0" cellspacing="0" cellpadding="0">
		      <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$name</b>&nbsp;&nbsp;</td>
        <td>profile name</td>
      </tr>
		      <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$scope</b>&nbsp;&nbsp;</td>
        <td>account type</td>
      </tr>
				</table>
    	<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
	</div>
  <hr />
	<a name="functionsaveSelfServiceProfile"></a>
	<h3>saveSelfServiceProfile <span class="smalllinenumber">[line 200]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>boolean saveSelfServiceProfile(
string $name, string $scope, <a href="../selfService/selfServiceProfile.html">selfServiceProfile</a> $profile)</code>
    </td></tr></table>
    </td></tr></table><br />

		Saves a self service profile.<br /><br /><p>File is created, if needed</p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>return:</b>&nbsp;&nbsp;</td><td>true, if saving succeeded</td>
  </tr>
</table>
</div>
    <br /><br />
	
    		<h4>Parameters</h4>
    <table border="0" cellspacing="0" cellpadding="0">
		      <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$name</b>&nbsp;&nbsp;</td>
        <td>name of the account profile</td>
      </tr>
		      <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$scope</b>&nbsp;&nbsp;</td>
        <td>account type</td>
      </tr>
		      <tr>
        <td class="type"><a href="../selfService/selfServiceProfile.html">selfServiceProfile</a>&nbsp;&nbsp;</td>
        <td><b>$profile</b>&nbsp;&nbsp;</td>
        <td>self service profile</td>
      </tr>
				</table>
    	<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
	</div>

        <div class="credit">
		    <hr />
		    Documentation generated on Sun, 25 Mar 2012 19:35:57 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
	      </div>
      </td></tr></table>
    </td>
  </tr>
</table>

</body>
</html>