Subversion Repositories php_users

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
26 rodolico 1
<!DOCTYPE html>
2
<html lang="en">
3
<head>
4
    <meta charset="utf-8">
5
    <title>Documentation</title>
6
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
    <base href="../">
8
    <link rel="icon" href="images/favicon.ico"/>
9
    <link rel="stylesheet" href="css/normalize.css">
10
    <link rel="stylesheet" href="css/base.css">
11
            <link rel="preconnect" href="https://fonts.gstatic.com">
12
        <link href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;600;700&display=swap" rel="stylesheet">
13
        <link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
14
        <link rel="stylesheet" href="css/template.css">
15
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
16
        <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
17
        <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
18
        <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
19
                <script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
20
        <script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
21
        <script src="js/search.js"></script>
22
        <script defer src="js/searchIndex.js"></script>
23
    </head>
24
<body id="top">
25
    <header class="phpdocumentor-header phpdocumentor-section">
26
    <h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">Documentation</a></h1>
27
    <input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
28
    <label class="phpdocumentor-header__menu-icon" for="menu-button">
29
        <i class="fas fa-bars"></i>
30
    </label>
31
    <section data-search-form class="phpdocumentor-search">
32
    <label>
33
        <span class="visually-hidden">Search for</span>
34
        <svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
35
            <circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
36
            <line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
37
        </svg>
38
        <input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
39
    </label>
40
</section>
41
 
42
    <nav class="phpdocumentor-topnav">
43
    <ul class="phpdocumentor-topnav__menu">
44
        </ul>
45
</nav>
46
</header>
47
 
48
    <main class="phpdocumentor">
49
        <div class="phpdocumentor-section">
50
            <input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
51
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
52
    Menu
53
</label>
54
<aside class="phpdocumentor-column -four phpdocumentor-sidebar">
55
 
56
    <section class="phpdocumentor-sidebar__category">
57
        <h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
58
            </section>
59
 
60
        <section class="phpdocumentor-sidebar__category">
61
        <h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
62
                    <h3 class="phpdocumentor-sidebar__root-package"><a href="packages/Application.html"><abbr title="\Application">Application</abbr></a></h3>
63
                        </section>
64
 
65
    <section class="phpdocumentor-sidebar__category">
66
        <h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
67
                <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
68
        <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
69
        <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
70
    </section>
71
 
72
    <section class="phpdocumentor-sidebar__category">
73
        <h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
74
        <h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
75
    </section>
76
</aside>
77
 
78
            <div class="phpdocumentor-column -eight phpdocumentor-content">
79
                    <ul class="phpdocumentor-breadcrumbs">
80
            <li class="phpdocumentor-breadcrumb"><a href="packages/Application.html">Application</a></li>
81
    </ul>
82
 
83
    <article class="phpdocumentor-element -class">
84
        <h2 class="phpdocumentor-content__title">
85
    UsersPermissions
86
 
87
        <span class="phpdocumentor-element__extends">
88
        extends <a href="classes/Users.html"><abbr title="\Users">Users</abbr></a>
89
    </span>
90
 
91
            <div class="phpdocumentor-element__package">
92
            in package
93
            <ul class="phpdocumentor-breadcrumbs">
94
                                    <li class="phpdocumentor-breadcrumb"><a href="packages/Application.html">Application</a></li>
95
                            </ul>
96
        </div>
97
 
98
 
99
    </h2>
100
 
101
        <aside class="phpdocumentor-element-found-in">
102
    <abbr class="phpdocumentor-element-found-in__file" title="UsersPermissions.class.php"><a href="files/userspermissions-class.html"><abbr title="UsersPermissions.class.php">UsersPermissions.class.php</abbr></a></abbr>
103
    :
104
    <span class="phpdocumentor-element-found-in__line">49</span>
105
 
106
    </aside>
107
 
108
            <p class="phpdocumentor-summary">User Permissions Login class</p>
109
 
110
    <section class="phpdocumentor-description"><p>IMPORTANT: Requires a data source. See UsersDataSourceMySQLi.class.php
111
for code which provides this for MySQLi</p>
112
<p>UsersPermissions extends the Users class to include boolean
113
permissions.</p>
114
</section>
115
 
116
 
117
    <h5 class="phpdocumentor-tag-list__heading" id="tags">
118
        Tags
119
        <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
120
    </h5>
121
    <dl class="phpdocumentor-tag-list">
122
                                    <dt class="phpdocumentor-tag-list__entry">
123
                    <span class="phpdocumentor-tag__name">author</span>
124
                </dt>
125
                <dd class="phpdocumentor-tag-list__definition">
126
 
127
                                                 <section class="phpdocumentor-description"><p>R. W. Rodolico <a href="mailto:rodo@unixservertech.com">rodo@unixservertech.com</a></p>
128
</section>
129
 
130
                                    </dd>
131
                                                <dt class="phpdocumentor-tag-list__entry">
132
                    <span class="phpdocumentor-tag__name">version</span>
133
                </dt>
134
                <dd class="phpdocumentor-tag-list__definition">
135
                                            <span class="phpdocumentor-tag-link">1.0.0</span>
136
 
137
                                                 <section class="phpdocumentor-description"><p>(beta)</p>
138
</section>
139
 
140
                                    </dd>
141
                                                <dt class="phpdocumentor-tag-list__entry">
142
                    <span class="phpdocumentor-tag__name">copyright</span>
143
                </dt>
144
                <dd class="phpdocumentor-tag-list__definition">
145
 
146
                                                 <section class="phpdocumentor-description"><p>2021 Daily Data, Inc.</p>
147
</section>
148
 
149
                                    </dd>
150
                        </dl>
151
 
152
 
153
 
154
 
155
 
156
 
157
<h3 id="toc">
158
    Table of Contents
159
    <a href="#toc" class="headerlink"><i class="fas fa-link"></i></a>
160
</h3>
161
 
162
<dl class="phpdocumentor-table-of-contents">
163
                <dt class="phpdocumentor-table-of-contents__entry -property -protected">
164
    <a href="classes/Users.html#property_configuration">$configuration</a>
165
    <span>
166
                &nbsp;: array&lt;string|int, string&gt;            </span>
167
</dt>
168
<dd></dd>
169
 
170
            <dt class="phpdocumentor-table-of-contents__entry -property -protected">
171
    <a href="classes/Users.html#property_data">$data</a>
172
    <span>
173
                &nbsp;: array&lt;string|int, string&gt;            </span>
174
</dt>
175
<dd></dd>
176
 
177
            <dt class="phpdocumentor-table-of-contents__entry -property -protected">
178
    <a href="classes/Users.html#property_errors">$errors</a>
179
    <span>
180
                &nbsp;: array&lt;string|int, string&gt;            </span>
181
</dt>
182
<dd></dd>
183
 
184
            <dt class="phpdocumentor-table-of-contents__entry -property -protected">
185
    <a href="classes/Users.html#property_workingOn">$workingOn</a>
186
    <span>
187
                &nbsp;: array&lt;string|int, string&gt;            </span>
188
</dt>
189
<dd></dd>
190
 
191
                <dt class="phpdocumentor-table-of-contents__entry -method -public">
192
    <a href="classes/UsersPermissions.html#method___construct">__construct()</a>
193
    <span>
194
                        &nbsp;: mixed    </span>
195
</dt>
196
<dd>Extends Users::_construct</dd>
197
 
198
            <dt class="phpdocumentor-table-of-contents__entry -method -public">
199
    <a href="classes/UsersPermissions.html#method_addPermission">addPermission()</a>
200
    <span>
201
                        &nbsp;: mixed    </span>
202
</dt>
203
<dd>Adds a permission to the permissions table</dd>
204
 
205
            <dt class="phpdocumentor-table-of-contents__entry -method -public">
206
    <a href="classes/Users.html#method_admin">admin()</a>
207
    <span>
208
                        &nbsp;: string    </span>
209
</dt>
210
<dd>Sets up the admin function which allows users to edit themselves and, optionally, others</dd>
211
 
212
            <dt class="phpdocumentor-table-of-contents__entry -method -public">
213
    <a href="classes/Users.html#method_allUsersHTML">allUsersHTML()</a>
214
    <span>
215
                        &nbsp;: string    </span>
216
</dt>
217
<dd>Get all users from data source and put them in an HTML list</dd>
218
 
219
            <dt class="phpdocumentor-table-of-contents__entry -method -public">
220
    <a href="classes/Users.html#method_clearErrors">clearErrors()</a>
221
    <span>
222
                        &nbsp;: mixed    </span>
223
</dt>
224
<dd>clears the errors array</dd>
225
 
226
            <dt class="phpdocumentor-table-of-contents__entry -method -public">
227
    <a href="classes/UsersPermissions.html#method_editScreen">editScreen()</a>
228
    <span>
229
                        &nbsp;: string    </span>
230
</dt>
231
<dd>Extends Users::editScreen</dd>
232
 
233
            <dt class="phpdocumentor-table-of-contents__entry -method -public">
234
    <a href="classes/Users.html#method_errors">errors()</a>
235
    <span>
236
                        &nbsp;: string    </span>
237
</dt>
238
<dd>getter for $this-&gt;errors</dd>
239
 
240
            <dt class="phpdocumentor-table-of-contents__entry -method -public">
241
    <a href="classes/Users.html#method_HTML">HTML()</a>
242
    <span>
243
                        &nbsp;: string    </span>
244
</dt>
245
<dd>Main display function.</dd>
246
 
247
            <dt class="phpdocumentor-table-of-contents__entry -method -public">
248
    <a href="classes/Users.html#method_isAdmin">isAdmin()</a>
249
    <span>
250
                        &nbsp;: bool    </span>
251
</dt>
252
<dd>getter for isAdmin</dd>
253
 
254
            <dt class="phpdocumentor-table-of-contents__entry -method -public">
255
    <a href="classes/UsersPermissions.html#method_isAuthorized">isAuthorized()</a>
256
    <span>
257
                        &nbsp;: mixed    </span>
258
</dt>
259
<dd>returns boolean as to whether the user has the passed in permission</dd>
260
 
261
            <dt class="phpdocumentor-table-of-contents__entry -method -public">
262
    <a href="classes/Users.html#method_logOut">logOut()</a>
263
    <span>
264
                        &nbsp;: mixed    </span>
265
</dt>
266
<dd>Logs user out of system</dd>
267
 
268
            <dt class="phpdocumentor-table-of-contents__entry -method -public">
269
    <a href="classes/Users.html#method_name">name()</a>
270
    <span>
271
                        &nbsp;: string    </span>
272
</dt>
273
<dd>getter for login name</dd>
274
 
275
            <dt class="phpdocumentor-table-of-contents__entry -method -protected">
276
    <a href="classes/UsersPermissions.html#method_addEdit">addEdit()</a>
277
    <span>
278
                        &nbsp;: mixed    </span>
279
</dt>
280
<dd>Adds/Updates existing record</dd>
281
 
282
            <dt class="phpdocumentor-table-of-contents__entry -method -protected">
283
    <a href="classes/Users.html#method_emptyWorkingOn">emptyWorkingOn()</a>
284
    <span>
285
                        &nbsp;: array&lt;string|int, string&gt;    </span>
286
</dt>
287
<dd>Creates a variable designed to replace $this-&gt;workingOn</dd>
288
 
289
            <dt class="phpdocumentor-table-of-contents__entry -method -protected">
290
    <a href="classes/Users.html#method_getNextScript">getNextScript()</a>
291
    <span>
292
                        &nbsp;: string    </span>
293
</dt>
294
<dd>Simple helper script to calculate next script to call</dd>
295
 
296
            <dt class="phpdocumentor-table-of-contents__entry -method -protected">
297
    <a href="classes/UsersPermissions.html#method_initWorkingOn">initWorkingOn()</a>
298
    <span>
299
                        &nbsp;: mixed    </span>
300
</dt>
301
<dd>Initializes $this-&gt;workingOn</dd>
302
 
303
            <dt class="phpdocumentor-table-of-contents__entry -method -protected">
304
    <a href="classes/Users.html#method_logInScreen">logInScreen()</a>
305
    <span>
306
                        &nbsp;: string    </span>
307
</dt>
308
<dd>Creates the fields needed for a login screen</dd>
309
 
310
            <dt class="phpdocumentor-table-of-contents__entry -method -protected">
311
    <a href="classes/Users.html#method_makeHTMLField">makeHTMLField()</a>
312
    <span>
313
                        &nbsp;: string    </span>
314
</dt>
315
<dd>Creates an HTML field for display</dd>
316
 
317
            <dt class="phpdocumentor-table-of-contents__entry -method -protected">
318
    <a href="classes/UsersPermissions.html#method_validate">validate()</a>
319
    <span>
320
                        &nbsp;: mixed    </span>
321
</dt>
322
<dd>Extends Users::validate</dd>
323
 
324
        </dl>
325
 
326
 
327
 
328
 
329
 
330
 
331
    <section class="phpdocumentor-properties">
332
        <h3 class="phpdocumentor-elements__header" id="properties">
333
            Properties
334
            <a href="classes/UsersPermissions.html#properties" class="headerlink"><i class="fas fa-link"></i></a>
335
        </h3>
336
                    <article
337
        class="
338
            phpdocumentor-element
339
            -property
340
            -protected
341
                                                        "
342
>
343
    <h4 class="phpdocumentor-element__name" id="property_configuration">
344
        $configuration
345
        <a href="classes/Users.html#property_configuration" class="headerlink"><i class="fas fa-link"></i></a>
346
        <span class="phpdocumentor-element__modifiers">
347
                                </span>
348
    </h4>
349
    <aside class="phpdocumentor-element-found-in">
350
    <abbr class="phpdocumentor-element-found-in__file" title="Users.class.php"><a href="files/users-class.html"><abbr title="Users.class.php">Users.class.php</abbr></a></abbr>
351
    :
352
    <span class="phpdocumentor-element-found-in__line">64</span>
353
 
354
    </aside>
355
 
356
 
357
    <code class="phpdocumentor-code phpdocumentor-signature ">
358
    <span class="phpdocumentor-signature__visibility">protected</span>
359
        <span class="phpdocumentor-signature__type">array&lt;string|int, string&gt;</span>
360
    <span class="phpdocumentor-signature__name">$configuration</span>
361
     = <span class="phpdocumentor-signature__default-value">array(
362
    /*
363
     * what to use for html input fields
364
     * These are passed to sprintf, with label, fieldname, title, placeholder and current value, in that order
365
     */
366
    &#039;screens&#039; =&gt; array(&#039;login form&#039; =&gt; &quot;&lt;h1&gt;Login&lt;/h1&gt;
367
&lt;form class=&#039;login_form&#039; action=&#039;%s&#039; method=&#039;post&#039;&gt;
368
%s
369
&lt;input type=&#039;submit&#039; value=&#039;Login&#039;&gt;&lt;/form&gt;
370
&quot;, &#039;edit form&#039; =&gt; &quot;&lt;form class=&#039;login_form&#039; action=&#039;%s&#039; method=&#039;post&#039;&gt;
371
%s
372
&lt;input type=&#039;submit&#039; name=&#039;btnUpdate&#039; value=&#039;Update&#039;&gt;
373
&lt;/form&gt;&quot;, &#039;loginScreen&#039; =&gt; &quot;&lt;div class=&#039;login_field&#039;&gt;
374
&lt;input class=&#039;login_field&#039; type=&#039;text&#039; name=&#039;username&#039; placeholder=&#039;Username&#039; required autofocus&gt;
375
&lt;/div&gt;
376
&lt;div class=&#039;login_field&#039;&gt;
377
&lt;input class=&#039;login_field&#039; type=&#039;password&#039; name=&#039;password&#039; placeholder=&#039;Password&#039; required&gt;
378
&lt;/div&gt;&quot;, &#039;adminScreen&#039; =&gt; &quot;&lt;input type=&#039;hidden&#039; name=&#039;doAdmin&#039; value=&#039;1&#039;&gt;
379
&quot;, &#039;validateScript&#039; =&gt; &#039;&#039;),
380
    &#039;html input fields&#039; =&gt; array(&#039;text&#039; =&gt; &quot;&lt;div class=&#039;login_field&#039;&gt;
381
&lt;label&gt;%s
382
&lt;input class=&#039;login_field&#039; type=&#039;text&#039; name=&#039;%s&#039; title=&#039;%s&#039; placeholder=&#039;%s&#039; value=&#039;~~%s~~&#039;&gt;
383
&lt;/label&gt;
384
&lt;/div&gt;&quot;, &#039;password&#039; =&gt; &quot;&lt;div class=&#039;login_field&#039;&gt;
385
&lt;label&gt;%s
386
&lt;input class=&#039;login_field&#039; type=&#039;password&#039; name=&#039;%s&#039; title=&#039;%s&#039; placeholder=&#039;%s&#039;&gt;
387
&lt;/label&gt;
388
&lt;/div&gt;&quot;, &#039;boolean&#039; =&gt; &quot;&lt;div class=&#039;login_field&#039;&gt;
389
&lt;label&gt;%s
390
&lt;input class=&#039;login_field&#039; type=&#039;checkbox&#039; name=&#039;%s&#039; title=&#039;%s&#039; value=&#039;1&#039; %s ~~%s~~&gt;
391
&lt;/label&gt;
392
&lt;/div&gt;&quot;, &#039;textarea&#039; =&gt; &quot;&lt;div class=&#039;login_field&#039;&gt;
393
&lt;label&gt;%s
394
&lt;textarea class=&#039;login_field&#039; name=&#039;%s&#039; title=&#039;%s&#039; placeholder=&#039;%s&#039;&gt;~~%s~~&lt;/textarea&gt;
395
&lt;/label&gt;
396
&lt;/div&gt;&quot;),
397
    &#039;input prefix&#039; =&gt; &#039;admin_&#039;,
398
    // prefix the name with this in a form
399
    &#039;tables&#039; =&gt; array(&#039;users&#039; =&gt; array(
400
        &#039;table&#039; =&gt; &#039;_users&#039;,
401
        // table name for user records
402
        &#039;id&#039; =&gt; &#039;_user_id&#039;,
403
        // ID column name
404
        &#039;display&#039; =&gt; array(
405
            // fields which are displayed to select
406
            &#039;login&#039;,
407
        ),
408
        &#039;form test&#039; =&gt; &#039;login&#039;,
409
        // field to test if form submitted
410
        &#039;fields&#039; =&gt; array(&#039;login&#039; =&gt; array(
411
            &#039;label&#039; =&gt; &#039;Username&#039;,
412
            // login name column name
413
            &#039;html type&#039; =&gt; &#039;text&#039;,
414
            &#039;filter&#039; =&gt; &#039;/^[a-zA-Z0-9_]+$/&#039;,
415
            &#039;instructions&#039; =&gt; &#039;Username can only contain alpha numerics and an underscore&#039;,
416
            &#039;hint&#039; =&gt; &#039;Change User Name&#039;,
417
            &#039;unique&#039; =&gt; 	rue,
418
        ), &#039;pass&#039; =&gt; array(
419
            &#039;label&#039; =&gt; &#039;Password&#039;,
420
            // password column name
421
            &#039;html type&#039; =&gt; &#039;password&#039;,
422
            &#039;instructions&#039; =&gt; &#039;Leave blank to keep same password&#039;,
423
            &#039;hint&#039; =&gt; &#039;Change Password&#039;,
424
        ), &#039;admin&#039; =&gt; array(&#039;label&#039; =&gt; &#039;isAdmin&#039;, &#039;html type&#039; =&gt; &#039;boolean&#039;, &#039;restrict&#039; =&gt; 	rue, &#039;instructions&#039; =&gt; &#039;If checked, user will be able to add/edit users&#039;), &#039;enabled&#039; =&gt; array(&#039;label&#039; =&gt; &#039;Enabled&#039;, &#039;html type&#039; =&gt; &#039;boolean&#039;, &#039;restrict&#039; =&gt; 	rue, &#039;instructions&#039; =&gt; &#039;Uncheck to disable log in&#039;)),
425
    )),
426
)</span></code>
427
 
428
 
429
        <section class="phpdocumentor-description"><p>Contains the configuration for the class</p>
430
<p>May be modified by the calling program. Must be replicated in userDataSource class</p>
431
</section>
432
 
433
 
434
 
435
</article>
436
                    <article
437
        class="
438
            phpdocumentor-element
439
            -property
440
            -protected
441
                                                        "
442
>
443
    <h4 class="phpdocumentor-element__name" id="property_data">
444
        $data
445
        <a href="classes/Users.html#property_data" class="headerlink"><i class="fas fa-link"></i></a>
446
        <span class="phpdocumentor-element__modifiers">
447
                                </span>
448
    </h4>
449
    <aside class="phpdocumentor-element-found-in">
450
    <abbr class="phpdocumentor-element-found-in__file" title="Users.class.php"><a href="files/users-class.html"><abbr title="Users.class.php">Users.class.php</abbr></a></abbr>
451
    :
452
    <span class="phpdocumentor-element-found-in__line">124</span>
453
 
454
    </aside>
455
 
456
 
457
    <code class="phpdocumentor-code phpdocumentor-signature ">
458
    <span class="phpdocumentor-signature__visibility">protected</span>
459
        <span class="phpdocumentor-signature__type">array&lt;string|int, string&gt;</span>
460
    <span class="phpdocumentor-signature__name">$data</span>
461
     = <span class="phpdocumentor-signature__default-value">array()</span></code>
462
 
463
 
464
        <section class="phpdocumentor-description"><p>Contains the information for the current logged in user</p>
465
</section>
466
 
467
 
468
 
469
</article>
470
                    <article
471
        class="
472
            phpdocumentor-element
473
            -property
474
            -protected
475
                                                        "
476
>
477
    <h4 class="phpdocumentor-element__name" id="property_errors">
478
        $errors
479
        <a href="classes/Users.html#property_errors" class="headerlink"><i class="fas fa-link"></i></a>
480
        <span class="phpdocumentor-element__modifiers">
481
                                </span>
482
    </h4>
483
    <aside class="phpdocumentor-element-found-in">
484
    <abbr class="phpdocumentor-element-found-in__file" title="Users.class.php"><a href="files/users-class.html"><abbr title="Users.class.php">Users.class.php</abbr></a></abbr>
485
    :
486
    <span class="phpdocumentor-element-found-in__line">126</span>
487
 
488
    </aside>
489
 
490
 
491
    <code class="phpdocumentor-code phpdocumentor-signature ">
492
    <span class="phpdocumentor-signature__visibility">protected</span>
493
        <span class="phpdocumentor-signature__type">array&lt;string|int, string&gt;</span>
494
    <span class="phpdocumentor-signature__name">$errors</span>
495
     = <span class="phpdocumentor-signature__default-value">array()</span></code>
496
 
497
 
498
        <section class="phpdocumentor-description"><p>Contains errors that can occur</p>
499
</section>
500
 
501
 
502
 
503
</article>
504
                    <article
505
        class="
506
            phpdocumentor-element
507
            -property
508
            -protected
509
                                                        "
510
>
511
    <h4 class="phpdocumentor-element__name" id="property_workingOn">
512
        $workingOn
513
        <a href="classes/Users.html#property_workingOn" class="headerlink"><i class="fas fa-link"></i></a>
514
        <span class="phpdocumentor-element__modifiers">
515
                                </span>
516
    </h4>
517
    <aside class="phpdocumentor-element-found-in">
518
    <abbr class="phpdocumentor-element-found-in__file" title="Users.class.php"><a href="files/users-class.html"><abbr title="Users.class.php">Users.class.php</abbr></a></abbr>
519
    :
520
    <span class="phpdocumentor-element-found-in__line">128</span>
521
 
522
    </aside>
523
 
524
 
525
    <code class="phpdocumentor-code phpdocumentor-signature ">
526
    <span class="phpdocumentor-signature__visibility">protected</span>
527
        <span class="phpdocumentor-signature__type">array&lt;string|int, string&gt;</span>
528
    <span class="phpdocumentor-signature__name">$workingOn</span>
529
     = <span class="phpdocumentor-signature__default-value">array()</span></code>
530
 
531
 
532
        <section class="phpdocumentor-description"><p>During administration, contains the record being modified</p>
533
</section>
534
 
535
 
536
 
537
</article>
538
            </section>
539
 
540
            <section class="phpdocumentor-methods">
541
        <h3 class="phpdocumentor-elements__header" id="methods">
542
            Methods
543
            <a href="classes/UsersPermissions.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
544
        </h3>
545
                    <article
546
        class="phpdocumentor-element
547
            -method
548
            -public
549
                                                        "
550
>
551
    <h4 class="phpdocumentor-element__name" id="method___construct">
552
        __construct()
553
        <a href="classes/UsersPermissions.html#method___construct" class="headerlink"><i class="fas fa-link"></i></a>
554
    </h4>
555
    <aside class="phpdocumentor-element-found-in">
556
    <abbr class="phpdocumentor-element-found-in__file" title="UsersPermissions.class.php"><a href="files/userspermissions-class.html"><abbr title="UsersPermissions.class.php">UsersPermissions.class.php</abbr></a></abbr>
557
    :
558
    <span class="phpdocumentor-element-found-in__line">60</span>
559
 
560
    </aside>
561
 
562
        <p class="phpdocumentor-summary">Extends Users::_construct</p>
563
 
564
    <code class="phpdocumentor-code phpdocumentor-signature ">
565
    <span class="phpdocumentor-signature__visibility">public</span>
566
                <span class="phpdocumentor-signature__name">__construct</span><span>(</span><span class="phpdocumentor-signature__argument"><span>[</span><span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, string&gt;&nbsp;</span><span class="phpdocumentor-signature__argument__name">$customFields</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">array()</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
567
 
568
        <section class="phpdocumentor-description"><p>Adds additional fields needed for permissions. However, this
569
information is not actually used in the code, but is included here
570
for documentation and/or possible extensions</p>
571
</section>
572
 
573
        <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
574
    <dl class="phpdocumentor-argument-list">
575
                    <dt class="phpdocumentor-argument-list__entry">
576
                <span class="phpdocumentor-signature__argument__name">$customFields</span>
577
                : <span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, string&gt;</span>
578
                 = <span class="phpdocumentor-signature__argument__default-value">array()</span>            </dt>
579
            <dd class="phpdocumentor-argument-list__definition">
580
                    <section class="phpdocumentor-description"><p>Array of definition modifications to underlying structure</p>
581
</section>
582
 
583
            </dd>
584
            </dl>
585
 
586
 
587
 
588
        <h5 class="phpdocumentor-return-value__heading">Return values</h5>
589
    <span class="phpdocumentor-signature__response_type">mixed</span>
590
            &mdash;
591
 
592
 
593
</article>
594
                    <article
595
        class="phpdocumentor-element
596
            -method
597
            -public
598
                                                        "
599
>
600
    <h4 class="phpdocumentor-element__name" id="method_addPermission">
601
        addPermission()
602
        <a href="classes/UsersPermissions.html#method_addPermission" class="headerlink"><i class="fas fa-link"></i></a>
603
    </h4>
604
    <aside class="phpdocumentor-element-found-in">
605
    <abbr class="phpdocumentor-element-found-in__file" title="UsersPermissions.class.php"><a href="files/userspermissions-class.html"><abbr title="UsersPermissions.class.php">UsersPermissions.class.php</abbr></a></abbr>
606
    :
607
    <span class="phpdocumentor-element-found-in__line">193</span>
608
 
609
    </aside>
610
 
611
        <p class="phpdocumentor-summary">Adds a permission to the permissions table</p>
612
 
613
    <code class="phpdocumentor-code phpdocumentor-signature ">
614
    <span class="phpdocumentor-signature__visibility">public</span>
615
                <span class="phpdocumentor-signature__name">addPermission</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">mixed&nbsp;</span><span class="phpdocumentor-signature__argument__name">$connection</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">mixed&nbsp;</span><span class="phpdocumentor-signature__argument__name">$category</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">mixed&nbsp;</span><span class="phpdocumentor-signature__argument__name">$name</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">mixed&nbsp;</span><span class="phpdocumentor-signature__argument__name">$description</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">mixed&nbsp;</span><span class="phpdocumentor-signature__argument__name">$defaultValue</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
616
 
617
        <section class="phpdocumentor-description"><p>This simply adds a permission to the permissions table, adding the
618
category if it doesn't exist already. Since this is already written
619
in usersPermissionsDataSource, we simply call it.</p>
620
</section>
621
 
622
        <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
623
    <dl class="phpdocumentor-argument-list">
624
                    <dt class="phpdocumentor-argument-list__entry">
625
                <span class="phpdocumentor-signature__argument__name">$connection</span>
626
                : <span class="phpdocumentor-signature__argument__return-type">mixed</span>
627
                            </dt>
628
            <dd class="phpdocumentor-argument-list__definition">
629
                    <section class="phpdocumentor-description"></section>
630
 
631
            </dd>
632
                    <dt class="phpdocumentor-argument-list__entry">
633
                <span class="phpdocumentor-signature__argument__name">$category</span>
634
                : <span class="phpdocumentor-signature__argument__return-type">mixed</span>
635
                            </dt>
636
            <dd class="phpdocumentor-argument-list__definition">
637
                    <section class="phpdocumentor-description"></section>
638
 
639
            </dd>
640
                    <dt class="phpdocumentor-argument-list__entry">
641
                <span class="phpdocumentor-signature__argument__name">$name</span>
642
                : <span class="phpdocumentor-signature__argument__return-type">mixed</span>
643
                            </dt>
644
            <dd class="phpdocumentor-argument-list__definition">
645
                    <section class="phpdocumentor-description"></section>
646
 
647
            </dd>
648
                    <dt class="phpdocumentor-argument-list__entry">
649
                <span class="phpdocumentor-signature__argument__name">$description</span>
650
                : <span class="phpdocumentor-signature__argument__return-type">mixed</span>
651
                            </dt>
652
            <dd class="phpdocumentor-argument-list__definition">
653
                    <section class="phpdocumentor-description"></section>
654
 
655
            </dd>
656
                    <dt class="phpdocumentor-argument-list__entry">
657
                <span class="phpdocumentor-signature__argument__name">$defaultValue</span>
658
                : <span class="phpdocumentor-signature__argument__return-type">mixed</span>
659
                            </dt>
660
            <dd class="phpdocumentor-argument-list__definition">
661
                    <section class="phpdocumentor-description"></section>
662
 
663
            </dd>
664
            </dl>
665
 
666
 
667
    <h5 class="phpdocumentor-tag-list__heading" id="tags">
668
        Tags
669
        <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
670
    </h5>
671
    <dl class="phpdocumentor-tag-list">
672
                                    <dt class="phpdocumentor-tag-list__entry">
673
                    <span class="phpdocumentor-tag__name">parameter</span>
674
                </dt>
675
                <dd class="phpdocumentor-tag-list__definition">
676
 
677
                                                 <section class="phpdocumentor-description"><p>string $category Category to place the permission into</p>
678
</section>
679
 
680
                                    </dd>
681
                            <dt class="phpdocumentor-tag-list__entry">
682
                    <span class="phpdocumentor-tag__name">parameter</span>
683
                </dt>
684
                <dd class="phpdocumentor-tag-list__definition">
685
 
686
                                                 <section class="phpdocumentor-description"><p>string $name The short name of the permission</p>
687
</section>
688
 
689
                                    </dd>
690
                            <dt class="phpdocumentor-tag-list__entry">
691
                    <span class="phpdocumentor-tag__name">parameter</span>
692
                </dt>
693
                <dd class="phpdocumentor-tag-list__definition">
694
 
695
                                                 <section class="phpdocumentor-description"><p>string $description The long (display) name for the permission</p>
696
</section>
697
 
698
                                    </dd>
699
                            <dt class="phpdocumentor-tag-list__entry">
700
                    <span class="phpdocumentor-tag__name">parameter</span>
701
                </dt>
702
                <dd class="phpdocumentor-tag-list__definition">
703
 
704
                                                 <section class="phpdocumentor-description"><p>boolean $defaultValue The default value for the permission</p>
705
</section>
706
 
707
                                    </dd>
708
                        </dl>
709
 
710
        <h5 class="phpdocumentor-return-value__heading">Return values</h5>
711
    <span class="phpdocumentor-signature__response_type">mixed</span>
712
            &mdash;
713
 
714
 
715
</article>
716
                    <article
717
        class="phpdocumentor-element
718
            -method
719
            -public
720
                                                        "
721
>
722
    <h4 class="phpdocumentor-element__name" id="method_admin">
723
        admin()
724
        <a href="classes/Users.html#method_admin" class="headerlink"><i class="fas fa-link"></i></a>
725
    </h4>
726
    <aside class="phpdocumentor-element-found-in">
727
    <abbr class="phpdocumentor-element-found-in__file" title="Users.class.php"><a href="files/users-class.html"><abbr title="Users.class.php">Users.class.php</abbr></a></abbr>
728
    :
729
    <span class="phpdocumentor-element-found-in__line">502</span>
730
 
731
    </aside>
732
 
733
        <p class="phpdocumentor-summary">Sets up the admin function which allows users to edit themselves and, optionally, others</p>
734
 
735
    <code class="phpdocumentor-code phpdocumentor-signature ">
736
    <span class="phpdocumentor-signature__visibility">public</span>
737
                <span class="phpdocumentor-signature__name">admin</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type"><a href="classes/usersDataSource.html"><abbr title="\usersDataSource">usersDataSource</abbr></a>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$connection</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">mixed&nbsp;</span><span class="phpdocumentor-signature__argument__name">$nextScript</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">null</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">string</span></code>
738
 
739
        <section class="phpdocumentor-description"><p>This should be called the first time, then repeatedly called until it is done
740
(it returns the string &quot;Updated&quot;, &quot;Failed&quot; or &quot;No changes&quot;.</p>
741
<p>The first iteration returns an edit screen displaying the users
742
information for them to edit. It will display an HTML INPUT for
743
each field that is not restricted. The user can then edit the
744
chosen entries and press the button, which will call the script
745
again, and update the record.</p>
746
<p>If the user has the admin right, the Edit screen also displays a
747
list of all users as an unsigned list of anchors. If the user
748
clicks on one of those, it will choose that user, load their data
749
and allow the user to edit that users record. NOTE: this is the
750
only way to edit fields with the restrict flag set.</p>
751
</section>
752
 
753
        <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
754
    <dl class="phpdocumentor-argument-list">
755
                    <dt class="phpdocumentor-argument-list__entry">
756
                <span class="phpdocumentor-signature__argument__name">$connection</span>
757
                : <span class="phpdocumentor-signature__argument__return-type"><a href="classes/usersDataSource.html"><abbr title="\usersDataSource">usersDataSource</abbr></a></span>
758
                            </dt>
759
            <dd class="phpdocumentor-argument-list__definition">
760
                    <section class="phpdocumentor-description"><p>A connection to the data source</p>
761
</section>
762
 
763
            </dd>
764
                    <dt class="phpdocumentor-argument-list__entry">
765
                <span class="phpdocumentor-signature__argument__name">$nextScript</span>
766
                : <span class="phpdocumentor-signature__argument__return-type">mixed</span>
767
                 = <span class="phpdocumentor-signature__argument__default-value">null</span>            </dt>
768
            <dd class="phpdocumentor-argument-list__definition">
769
                    <section class="phpdocumentor-description"></section>
770
 
771
            </dd>
772
            </dl>
773
 
774
 
775
 
776
        <h5 class="phpdocumentor-return-value__heading">Return values</h5>
777
    <span class="phpdocumentor-signature__response_type">string</span>
778
            &mdash;
779
            <section class="phpdocumentor-description"><p>This may be an HTML table or a single screen</p>
780
</section>
781
 
782
 
783
</article>
784
                    <article
785
        class="phpdocumentor-element
786
            -method
787
            -public
788
                                                        "
789
>
790
    <h4 class="phpdocumentor-element__name" id="method_allUsersHTML">
791
        allUsersHTML()
792
        <a href="classes/Users.html#method_allUsersHTML" class="headerlink"><i class="fas fa-link"></i></a>
793
    </h4>
794
    <aside class="phpdocumentor-element-found-in">
795
    <abbr class="phpdocumentor-element-found-in__file" title="Users.class.php"><a href="files/users-class.html"><abbr title="Users.class.php">Users.class.php</abbr></a></abbr>
796
    :
797
    <span class="phpdocumentor-element-found-in__line">247</span>
798
 
799
    </aside>
800
 
801
        <p class="phpdocumentor-summary">Get all users from data source and put them in an HTML list</p>
802
 
803
    <code class="phpdocumentor-code phpdocumentor-signature ">
804
    <span class="phpdocumentor-signature__visibility">public</span>
805
                <span class="phpdocumentor-signature__name">allUsersHTML</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type"><a href="classes/usersDataSource.html"><abbr title="\usersDataSource">usersDataSource</abbr></a>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$connection</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$nextPage</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">null</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">string</span></code>
806
 
807
        <section class="phpdocumentor-description"><p>Will retrieve the ID and login name of all users, putting them
808
in a list of anchors to allow an admin to select one for editing</p>
809
</section>
810
 
811
        <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
812
    <dl class="phpdocumentor-argument-list">
813
                    <dt class="phpdocumentor-argument-list__entry">
814
                <span class="phpdocumentor-signature__argument__name">$connection</span>
815
                : <span class="phpdocumentor-signature__argument__return-type"><a href="classes/usersDataSource.html"><abbr title="\usersDataSource">usersDataSource</abbr></a></span>
816
                            </dt>
817
            <dd class="phpdocumentor-argument-list__definition">
818
                    <section class="phpdocumentor-description"><p>A connection to the data source</p>
819
</section>
820
 
821
            </dd>
822
                    <dt class="phpdocumentor-argument-list__entry">
823
                <span class="phpdocumentor-signature__argument__name">$nextPage</span>
824
                : <span class="phpdocumentor-signature__argument__return-type">string</span>
825
                 = <span class="phpdocumentor-signature__argument__default-value">null</span>            </dt>
826
            <dd class="phpdocumentor-argument-list__definition">
827
                    <section class="phpdocumentor-description"><p>The URL of the page to be used in the link</p>
828
</section>
829
 
830
            </dd>
831
            </dl>
832
 
833
 
834
 
835
        <h5 class="phpdocumentor-return-value__heading">Return values</h5>
836
    <span class="phpdocumentor-signature__response_type">string</span>
837
            &mdash;
838
            <section class="phpdocumentor-description"><p>an unordered list (UL) containing links with names</p>
839
</section>
840
 
841
 
842
</article>
843
                    <article
844
        class="phpdocumentor-element
845
            -method
846
            -public
847
                                                        "
848
>
849
    <h4 class="phpdocumentor-element__name" id="method_clearErrors">
850
        clearErrors()
851
        <a href="classes/Users.html#method_clearErrors" class="headerlink"><i class="fas fa-link"></i></a>
852
    </h4>
853
    <aside class="phpdocumentor-element-found-in">
854
    <abbr class="phpdocumentor-element-found-in__file" title="Users.class.php"><a href="files/users-class.html"><abbr title="Users.class.php">Users.class.php</abbr></a></abbr>
855
    :
856
    <span class="phpdocumentor-element-found-in__line">157</span>
857
 
858
    </aside>
859
 
860
        <p class="phpdocumentor-summary">clears the errors array</p>
861
 
862
    <code class="phpdocumentor-code phpdocumentor-signature ">
863
    <span class="phpdocumentor-signature__visibility">public</span>
864
                <span class="phpdocumentor-signature__name">clearErrors</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
865
 
866
 
867
 
868
 
869
 
870
        <h5 class="phpdocumentor-return-value__heading">Return values</h5>
871
    <span class="phpdocumentor-signature__response_type">mixed</span>
872
            &mdash;
873
 
874
 
875
</article>
876
                    <article
877
        class="phpdocumentor-element
878
            -method
879
            -public
880
                                                        "
881
>
882
    <h4 class="phpdocumentor-element__name" id="method_editScreen">
883
        editScreen()
884
        <a href="classes/UsersPermissions.html#method_editScreen" class="headerlink"><i class="fas fa-link"></i></a>
885
    </h4>
886
    <aside class="phpdocumentor-element-found-in">
887
    <abbr class="phpdocumentor-element-found-in__file" title="UsersPermissions.class.php"><a href="files/userspermissions-class.html"><abbr title="UsersPermissions.class.php">UsersPermissions.class.php</abbr></a></abbr>
888
    :
889
    <span class="phpdocumentor-element-found-in__line">95</span>
890
 
891
    </aside>
892
 
893
        <p class="phpdocumentor-summary">Extends Users::editScreen</p>
894
 
895
    <code class="phpdocumentor-code phpdocumentor-signature ">
896
    <span class="phpdocumentor-signature__visibility">public</span>
897
                <span class="phpdocumentor-signature__name">editScreen</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type"><abbr title="\usersPermissionsDataSource">usersPermissionsDataSource</abbr>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$connection</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">string</span></code>
898
 
899
        <section class="phpdocumentor-description"><p>Adds permissions in div of class category</p>
900
</section>
901
 
902
        <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
903
    <dl class="phpdocumentor-argument-list">
904
                    <dt class="phpdocumentor-argument-list__entry">
905
                <span class="phpdocumentor-signature__argument__name">$connection</span>
906
                : <span class="phpdocumentor-signature__argument__return-type"><abbr title="\usersPermissionsDataSource">usersPermissionsDataSource</abbr></span>
907
                            </dt>
908
            <dd class="phpdocumentor-argument-list__definition">
909
 
910
            </dd>
911
            </dl>
912
 
913
 
914
    <h5 class="phpdocumentor-tag-list__heading" id="tags">
915
        Tags
916
        <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
917
    </h5>
918
    <dl class="phpdocumentor-tag-list">
919
                                    <dt class="phpdocumentor-tag-list__entry">
920
                    <span class="phpdocumentor-tag__name">returns</span>
921
                </dt>
922
                <dd class="phpdocumentor-tag-list__definition">
923
 
924
                                                 <section class="phpdocumentor-description"><p>string HTML display screen</p>
925
</section>
926
 
927
                                    </dd>
928
                        </dl>
929
 
930
        <h5 class="phpdocumentor-return-value__heading">Return values</h5>
931
    <span class="phpdocumentor-signature__response_type">string</span>
932
            &mdash;
933
            <section class="phpdocumentor-description"><p>HTML containing all of the INPUT records a user can edit</p>
934
</section>
935
 
936
 
937
</article>
938
                    <article
939
        class="phpdocumentor-element
940
            -method
941
            -public
942
                                                        "
943
>
944
    <h4 class="phpdocumentor-element__name" id="method_errors">
945
        errors()
946
        <a href="classes/Users.html#method_errors" class="headerlink"><i class="fas fa-link"></i></a>
947
    </h4>
948
    <aside class="phpdocumentor-element-found-in">
949
    <abbr class="phpdocumentor-element-found-in__file" title="Users.class.php"><a href="files/users-class.html"><abbr title="Users.class.php">Users.class.php</abbr></a></abbr>
950
    :
951
    <span class="phpdocumentor-element-found-in__line">149</span>
952
 
953
    </aside>
954
 
955
        <p class="phpdocumentor-summary">getter for $this-&gt;errors</p>
956
 
957
    <code class="phpdocumentor-code phpdocumentor-signature ">
958
    <span class="phpdocumentor-signature__visibility">public</span>
959
                <span class="phpdocumentor-signature__name">errors</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">string</span></code>
960
 
961
 
962
 
963
 
964
 
965
        <h5 class="phpdocumentor-return-value__heading">Return values</h5>
966
    <span class="phpdocumentor-signature__response_type">string</span>
967
            &mdash;
968
            <section class="phpdocumentor-description"><p>html div containing one paragraph for every error</p>
969
</section>
970
 
971
 
972
</article>
973
                    <article
974
        class="phpdocumentor-element
975
            -method
976
            -public
977
                                                        "
978
>
979
    <h4 class="phpdocumentor-element__name" id="method_HTML">
980
        HTML()
981
        <a href="classes/Users.html#method_HTML" class="headerlink"><i class="fas fa-link"></i></a>
982
    </h4>
983
    <aside class="phpdocumentor-element-found-in">
984
    <abbr class="phpdocumentor-element-found-in__file" title="Users.class.php"><a href="files/users-class.html"><abbr title="Users.class.php">Users.class.php</abbr></a></abbr>
985
    :
986
    <span class="phpdocumentor-element-found-in__line">191</span>
987
 
988
    </aside>
989
 
990
        <p class="phpdocumentor-summary">Main display function.</p>
991
 
992
    <code class="phpdocumentor-code phpdocumentor-signature ">
993
    <span class="phpdocumentor-signature__visibility">public</span>
994
                <span class="phpdocumentor-signature__name">HTML</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type"><a href="classes/usersDataSource.html"><abbr title="\usersDataSource">usersDataSource</abbr></a>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$connection</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$nextScript</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">null</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">string</span></code>
995
 
996
        <section class="phpdocumentor-description"><p>This function should be called to perform the login. It performs all functions
997
needed to log in and validate, but once logged in, will return an empty string.</p>
998
</section>
999
 
1000
        <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
1001
    <dl class="phpdocumentor-argument-list">
1002
                    <dt class="phpdocumentor-argument-list__entry">
1003
                <span class="phpdocumentor-signature__argument__name">$connection</span>
1004
                : <span class="phpdocumentor-signature__argument__return-type"><a href="classes/usersDataSource.html"><abbr title="\usersDataSource">usersDataSource</abbr></a></span>
1005
                            </dt>
1006
            <dd class="phpdocumentor-argument-list__definition">
1007
                    <section class="phpdocumentor-description"><p>A connection to the data source</p>
1008
</section>
1009
 
1010
            </dd>
1011
                    <dt class="phpdocumentor-argument-list__entry">
1012
                <span class="phpdocumentor-signature__argument__name">$nextScript</span>
1013
                : <span class="phpdocumentor-signature__argument__return-type">string</span>
1014
                 = <span class="phpdocumentor-signature__argument__default-value">null</span>            </dt>
1015
            <dd class="phpdocumentor-argument-list__definition">
1016
                    <section class="phpdocumentor-description"><p>The url to be run when logged in</p>
1017
</section>
1018
 
1019
            </dd>
1020
            </dl>
1021
 
1022
 
1023
 
1024
        <h5 class="phpdocumentor-return-value__heading">Return values</h5>
1025
    <span class="phpdocumentor-signature__response_type">string</span>
1026
            &mdash;
1027
            <section class="phpdocumentor-description"><p>A (possibly empty) HTML div</p>
1028
</section>
1029
 
1030
 
1031
</article>
1032
                    <article
1033
        class="phpdocumentor-element
1034
            -method
1035
            -public
1036
                                                        "
1037
>
1038
    <h4 class="phpdocumentor-element__name" id="method_isAdmin">
1039
        isAdmin()
1040
        <a href="classes/Users.html#method_isAdmin" class="headerlink"><i class="fas fa-link"></i></a>
1041
    </h4>
1042
    <aside class="phpdocumentor-element-found-in">
1043
    <abbr class="phpdocumentor-element-found-in__file" title="Users.class.php"><a href="files/users-class.html"><abbr title="Users.class.php">Users.class.php</abbr></a></abbr>
1044
    :
1045
    <span class="phpdocumentor-element-found-in__line">166</span>
1046
 
1047
    </aside>
1048
 
1049
        <p class="phpdocumentor-summary">getter for isAdmin</p>
1050
 
1051
    <code class="phpdocumentor-code phpdocumentor-signature ">
1052
    <span class="phpdocumentor-signature__visibility">public</span>
1053
                <span class="phpdocumentor-signature__name">isAdmin</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">bool</span></code>
1054
 
1055
 
1056
 
1057
 
1058
 
1059
        <h5 class="phpdocumentor-return-value__heading">Return values</h5>
1060
    <span class="phpdocumentor-signature__response_type">bool</span>
1061
            &mdash;
1062
            <section class="phpdocumentor-description"><p>true if user is an admin, false if not</p>
1063
</section>
1064
 
1065
 
1066
</article>
1067
                    <article
1068
        class="phpdocumentor-element
1069
            -method
1070
            -public
1071
                                                        "
1072
>
1073
    <h4 class="phpdocumentor-element__name" id="method_isAuthorized">
1074
        isAuthorized()
1075
        <a href="classes/UsersPermissions.html#method_isAuthorized" class="headerlink"><i class="fas fa-link"></i></a>
1076
    </h4>
1077
    <aside class="phpdocumentor-element-found-in">
1078
    <abbr class="phpdocumentor-element-found-in__file" title="UsersPermissions.class.php"><a href="files/userspermissions-class.html"><abbr title="UsersPermissions.class.php">UsersPermissions.class.php</abbr></a></abbr>
1079
    :
1080
    <span class="phpdocumentor-element-found-in__line">177</span>
1081
 
1082
    </aside>
1083
 
1084
        <p class="phpdocumentor-summary">returns boolean as to whether the user has the passed in permission</p>
1085
 
1086
    <code class="phpdocumentor-code phpdocumentor-signature ">
1087
    <span class="phpdocumentor-signature__visibility">public</span>
1088
                <span class="phpdocumentor-signature__name">isAuthorized</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$permission</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
1089
 
1090
        <section class="phpdocumentor-description"><p>If user is an admin, they automatically have all permissions, otherwise
1091
we check for the permission. NOTE: the existence of a permission
1092
is not validated. If a permission does not exist, will return false
1093
for anyone but an admin</p>
1094
</section>
1095
 
1096
        <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
1097
    <dl class="phpdocumentor-argument-list">
1098
                    <dt class="phpdocumentor-argument-list__entry">
1099
                <span class="phpdocumentor-signature__argument__name">$permission</span>
1100
                : <span class="phpdocumentor-signature__argument__return-type">string</span>
1101
                            </dt>
1102
            <dd class="phpdocumentor-argument-list__definition">
1103
                    <section class="phpdocumentor-description"><p>short form of permission</p>
1104
</section>
1105
 
1106
            </dd>
1107
            </dl>
1108
 
1109
 
1110
    <h5 class="phpdocumentor-tag-list__heading" id="tags">
1111
        Tags
1112
        <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
1113
    </h5>
1114
    <dl class="phpdocumentor-tag-list">
1115
                                    <dt class="phpdocumentor-tag-list__entry">
1116
                    <span class="phpdocumentor-tag__name">returns</span>
1117
                </dt>
1118
                <dd class="phpdocumentor-tag-list__definition">
1119
 
1120
                                                 <section class="phpdocumentor-description"><p>boolean</p>
1121
</section>
1122
 
1123
                                    </dd>
1124
                        </dl>
1125
 
1126
        <h5 class="phpdocumentor-return-value__heading">Return values</h5>
1127
    <span class="phpdocumentor-signature__response_type">mixed</span>
1128
            &mdash;
1129
 
1130
 
1131
</article>
1132
                    <article
1133
        class="phpdocumentor-element
1134
            -method
1135
            -public
1136
                                                        "
1137
>
1138
    <h4 class="phpdocumentor-element__name" id="method_logOut">
1139
        logOut()
1140
        <a href="classes/Users.html#method_logOut" class="headerlink"><i class="fas fa-link"></i></a>
1141
    </h4>
1142
    <aside class="phpdocumentor-element-found-in">
1143
    <abbr class="phpdocumentor-element-found-in__file" title="Users.class.php"><a href="files/users-class.html"><abbr title="Users.class.php">Users.class.php</abbr></a></abbr>
1144
    :
1145
    <span class="phpdocumentor-element-found-in__line">271</span>
1146
 
1147
    </aside>
1148
 
1149
        <p class="phpdocumentor-summary">Logs user out of system</p>
1150
 
1151
    <code class="phpdocumentor-code phpdocumentor-signature ">
1152
    <span class="phpdocumentor-signature__visibility">public</span>
1153
                <span class="phpdocumentor-signature__name">logOut</span><span>(</span><span class="phpdocumentor-signature__argument"><span>[</span><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$nextScript</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">null</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
1154
 
1155
        <section class="phpdocumentor-description"><p>destroys itself ($_SESSION['user'], then session, then calls
1156
$nextScript by doing a header call.</p>
1157
</section>
1158
 
1159
        <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
1160
    <dl class="phpdocumentor-argument-list">
1161
                    <dt class="phpdocumentor-argument-list__entry">
1162
                <span class="phpdocumentor-signature__argument__name">$nextScript</span>
1163
                : <span class="phpdocumentor-signature__argument__return-type">string</span>
1164
                 = <span class="phpdocumentor-signature__argument__default-value">null</span>            </dt>
1165
            <dd class="phpdocumentor-argument-list__definition">
1166
                    <section class="phpdocumentor-description"><p>URL of next script to call</p>
1167
</section>
1168
 
1169
            </dd>
1170
            </dl>
1171
 
1172
 
1173
 
1174
        <h5 class="phpdocumentor-return-value__heading">Return values</h5>
1175
    <span class="phpdocumentor-signature__response_type">mixed</span>
1176
            &mdash;
1177
 
1178
 
1179
</article>
1180
                    <article
1181
        class="phpdocumentor-element
1182
            -method
1183
            -public
1184
                                                        "
1185
>
1186
    <h4 class="phpdocumentor-element__name" id="method_name">
1187
        name()
1188
        <a href="classes/Users.html#method_name" class="headerlink"><i class="fas fa-link"></i></a>
1189
    </h4>
1190
    <aside class="phpdocumentor-element-found-in">
1191
    <abbr class="phpdocumentor-element-found-in__file" title="Users.class.php"><a href="files/users-class.html"><abbr title="Users.class.php">Users.class.php</abbr></a></abbr>
1192
    :
1193
    <span class="phpdocumentor-element-found-in__line">175</span>
1194
 
1195
    </aside>
1196
 
1197
        <p class="phpdocumentor-summary">getter for login name</p>
1198
 
1199
    <code class="phpdocumentor-code phpdocumentor-signature ">
1200
    <span class="phpdocumentor-signature__visibility">public</span>
1201
                <span class="phpdocumentor-signature__name">name</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">string</span></code>
1202
 
1203
 
1204
 
1205
 
1206
 
1207
        <h5 class="phpdocumentor-return-value__heading">Return values</h5>
1208
    <span class="phpdocumentor-signature__response_type">string</span>
1209
            &mdash;
1210
            <section class="phpdocumentor-description"><p>user name</p>
1211
</section>
1212
 
1213
 
1214
</article>
1215
                    <article
1216
        class="phpdocumentor-element
1217
            -method
1218
            -protected
1219
                                                        "
1220
>
1221
    <h4 class="phpdocumentor-element__name" id="method_addEdit">
1222
        addEdit()
1223
        <a href="classes/UsersPermissions.html#method_addEdit" class="headerlink"><i class="fas fa-link"></i></a>
1224
    </h4>
1225
    <aside class="phpdocumentor-element-found-in">
1226
    <abbr class="phpdocumentor-element-found-in__file" title="UsersPermissions.class.php"><a href="files/userspermissions-class.html"><abbr title="UsersPermissions.class.php">UsersPermissions.class.php</abbr></a></abbr>
1227
    :
1228
    <span class="phpdocumentor-element-found-in__line">131</span>
1229
 
1230
    </aside>
1231
 
1232
        <p class="phpdocumentor-summary">Adds/Updates existing record</p>
1233
 
1234
    <code class="phpdocumentor-code phpdocumentor-signature ">
1235
    <span class="phpdocumentor-signature__visibility">protected</span>
1236
                <span class="phpdocumentor-signature__name">addEdit</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type"><abbr title="\usersPermissionsDataSource">usersPermissionsDataSource</abbr>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$connection</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
1237
 
1238
        <section class="phpdocumentor-description"><p>Extending Users::addEdit by updating the permissions</p>
1239
</section>
1240
 
1241
        <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
1242
    <dl class="phpdocumentor-argument-list">
1243
                    <dt class="phpdocumentor-argument-list__entry">
1244
                <span class="phpdocumentor-signature__argument__name">$connection</span>
1245
                : <span class="phpdocumentor-signature__argument__return-type"><abbr title="\usersPermissionsDataSource">usersPermissionsDataSource</abbr></span>
1246
                            </dt>
1247
            <dd class="phpdocumentor-argument-list__definition">
1248
 
1249
            </dd>
1250
            </dl>
1251
 
1252
 
1253
    <h5 class="phpdocumentor-tag-list__heading" id="tags">
1254
        Tags
1255
        <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
1256
    </h5>
1257
    <dl class="phpdocumentor-tag-list">
1258
                                    <dt class="phpdocumentor-tag-list__entry">
1259
                    <span class="phpdocumentor-tag__name">returns</span>
1260
                </dt>
1261
                <dd class="phpdocumentor-tag-list__definition">
1262
 
1263
                                                 <section class="phpdocumentor-description"><p>string Message saying whether the update/insert worked</p>
1264
</section>
1265
 
1266
                                    </dd>
1267
                        </dl>
1268
 
1269
        <h5 class="phpdocumentor-return-value__heading">Return values</h5>
1270
    <span class="phpdocumentor-signature__response_type">mixed</span>
1271
            &mdash;
1272
 
1273
 
1274
</article>
1275
                    <article
1276
        class="phpdocumentor-element
1277
            -method
1278
            -protected
1279
                                                        "
1280
>
1281
    <h4 class="phpdocumentor-element__name" id="method_emptyWorkingOn">
1282
        emptyWorkingOn()
1283
        <a href="classes/Users.html#method_emptyWorkingOn" class="headerlink"><i class="fas fa-link"></i></a>
1284
    </h4>
1285
    <aside class="phpdocumentor-element-found-in">
1286
    <abbr class="phpdocumentor-element-found-in__file" title="Users.class.php"><a href="files/users-class.html"><abbr title="Users.class.php">Users.class.php</abbr></a></abbr>
1287
    :
1288
    <span class="phpdocumentor-element-found-in__line">401</span>
1289
 
1290
    </aside>
1291
 
1292
        <p class="phpdocumentor-summary">Creates a variable designed to replace $this-&gt;workingOn</p>
1293
 
1294
    <code class="phpdocumentor-code phpdocumentor-signature ">
1295
    <span class="phpdocumentor-signature__visibility">protected</span>
1296
                <span class="phpdocumentor-signature__name">emptyWorkingOn</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">array&lt;string|int, string&gt;</span></code>
1297
 
1298
        <section class="phpdocumentor-description"><p>Initializes all fields to something non-null and sets id to -1</p>
1299
</section>
1300
 
1301
 
1302
 
1303
 
1304
        <h5 class="phpdocumentor-return-value__heading">Return values</h5>
1305
    <span class="phpdocumentor-signature__response_type">array&lt;string|int, string&gt;</span>
1306
            &mdash;
1307
            <section class="phpdocumentor-description"><p>An array initialized with all records needed</p>
1308
</section>
1309
 
1310
 
1311
</article>
1312
                    <article
1313
        class="phpdocumentor-element
1314
            -method
1315
            -protected
1316
                                                        "
1317
>
1318
    <h4 class="phpdocumentor-element__name" id="method_getNextScript">
1319
        getNextScript()
1320
        <a href="classes/Users.html#method_getNextScript" class="headerlink"><i class="fas fa-link"></i></a>
1321
    </h4>
1322
    <aside class="phpdocumentor-element-found-in">
1323
    <abbr class="phpdocumentor-element-found-in__file" title="Users.class.php"><a href="files/users-class.html"><abbr title="Users.class.php">Users.class.php</abbr></a></abbr>
1324
    :
1325
    <span class="phpdocumentor-element-found-in__line">289</span>
1326
 
1327
    </aside>
1328
 
1329
        <p class="phpdocumentor-summary">Simple helper script to calculate next script to call</p>
1330
 
1331
    <code class="phpdocumentor-code phpdocumentor-signature ">
1332
    <span class="phpdocumentor-signature__visibility">protected</span>
1333
                <span class="phpdocumentor-signature__name">getNextScript</span><span>(</span><span class="phpdocumentor-signature__argument"><span>[</span><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$nextScript</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">null</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">string</span></code>
1334
 
1335
        <section class="phpdocumentor-description"><p>Returns one of three URL strings, in order of precedence
1336
$nextScript
1337
$configuration['screens']['validateScript']
1338
PHP_SELF</p>
1339
</section>
1340
 
1341
        <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
1342
    <dl class="phpdocumentor-argument-list">
1343
                    <dt class="phpdocumentor-argument-list__entry">
1344
                <span class="phpdocumentor-signature__argument__name">$nextScript</span>
1345
                : <span class="phpdocumentor-signature__argument__return-type">string</span>
1346
                 = <span class="phpdocumentor-signature__argument__default-value">null</span>            </dt>
1347
            <dd class="phpdocumentor-argument-list__definition">
1348
                    <section class="phpdocumentor-description"><p>URL to call</p>
1349
</section>
1350
 
1351
            </dd>
1352
            </dl>
1353
 
1354
 
1355
 
1356
        <h5 class="phpdocumentor-return-value__heading">Return values</h5>
1357
    <span class="phpdocumentor-signature__response_type">string</span>
1358
            &mdash;
1359
            <section class="phpdocumentor-description"><p>URL</p>
1360
</section>
1361
 
1362
 
1363
</article>
1364
                    <article
1365
        class="phpdocumentor-element
1366
            -method
1367
            -protected
1368
                                                        "
1369
>
1370
    <h4 class="phpdocumentor-element__name" id="method_initWorkingOn">
1371
        initWorkingOn()
1372
        <a href="classes/UsersPermissions.html#method_initWorkingOn" class="headerlink"><i class="fas fa-link"></i></a>
1373
    </h4>
1374
    <aside class="phpdocumentor-element-found-in">
1375
    <abbr class="phpdocumentor-element-found-in__file" title="UsersPermissions.class.php"><a href="files/userspermissions-class.html"><abbr title="UsersPermissions.class.php">UsersPermissions.class.php</abbr></a></abbr>
1376
    :
1377
    <span class="phpdocumentor-element-found-in__line">159</span>
1378
 
1379
    </aside>
1380
 
1381
        <p class="phpdocumentor-summary">Initializes $this-&gt;workingOn</p>
1382
 
1383
    <code class="phpdocumentor-code phpdocumentor-signature ">
1384
    <span class="phpdocumentor-signature__visibility">protected</span>
1385
                <span class="phpdocumentor-signature__name">initWorkingOn</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">mixed&nbsp;</span><span class="phpdocumentor-signature__argument__name">$connection</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">mixed&nbsp;</span><span class="phpdocumentor-signature__argument__name">$id</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
1386
 
1387
        <section class="phpdocumentor-description"><p>This is a modification to Users::initWorkingOn to add permissions</p>
1388
</section>
1389
 
1390
        <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
1391
    <dl class="phpdocumentor-argument-list">
1392
                    <dt class="phpdocumentor-argument-list__entry">
1393
                <span class="phpdocumentor-signature__argument__name">$connection</span>
1394
                : <span class="phpdocumentor-signature__argument__return-type">mixed</span>
1395
                            </dt>
1396
            <dd class="phpdocumentor-argument-list__definition">
1397
                    <section class="phpdocumentor-description"></section>
1398
 
1399
            </dd>
1400
                    <dt class="phpdocumentor-argument-list__entry">
1401
                <span class="phpdocumentor-signature__argument__name">$id</span>
1402
                : <span class="phpdocumentor-signature__argument__return-type">mixed</span>
1403
                            </dt>
1404
            <dd class="phpdocumentor-argument-list__definition">
1405
                    <section class="phpdocumentor-description"></section>
1406
 
1407
            </dd>
1408
            </dl>
1409
 
1410
 
1411
 
1412
        <h5 class="phpdocumentor-return-value__heading">Return values</h5>
1413
    <span class="phpdocumentor-signature__response_type">mixed</span>
1414
            &mdash;
1415
 
1416
 
1417
</article>
1418
                    <article
1419
        class="phpdocumentor-element
1420
            -method
1421
            -protected
1422
                                                        "
1423
>
1424
    <h4 class="phpdocumentor-element__name" id="method_logInScreen">
1425
        logInScreen()
1426
        <a href="classes/Users.html#method_logInScreen" class="headerlink"><i class="fas fa-link"></i></a>
1427
    </h4>
1428
    <aside class="phpdocumentor-element-found-in">
1429
    <abbr class="phpdocumentor-element-found-in__file" title="Users.class.php"><a href="files/users-class.html"><abbr title="Users.class.php">Users.class.php</abbr></a></abbr>
1430
    :
1431
    <span class="phpdocumentor-element-found-in__line">307</span>
1432
 
1433
    </aside>
1434
 
1435
        <p class="phpdocumentor-summary">Creates the fields needed for a login screen</p>
1436
 
1437
    <code class="phpdocumentor-code phpdocumentor-signature ">
1438
    <span class="phpdocumentor-signature__visibility">protected</span>
1439
                <span class="phpdocumentor-signature__name">logInScreen</span><span>(</span><span class="phpdocumentor-signature__argument"><span>[</span><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$nextScript</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">null</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">string</span></code>
1440
 
1441
        <section class="phpdocumentor-description"><p>Populates %s's in 'login form' with values for $nextScript and
1442
'loginScreen'</p>
1443
</section>
1444
 
1445
        <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
1446
    <dl class="phpdocumentor-argument-list">
1447
                    <dt class="phpdocumentor-argument-list__entry">
1448
                <span class="phpdocumentor-signature__argument__name">$nextScript</span>
1449
                : <span class="phpdocumentor-signature__argument__return-type">string</span>
1450
                 = <span class="phpdocumentor-signature__argument__default-value">null</span>            </dt>
1451
            <dd class="phpdocumentor-argument-list__definition">
1452
                    <section class="phpdocumentor-description"><p>URL to call form</p>
1453
</section>
1454
 
1455
            </dd>
1456
            </dl>
1457
 
1458
 
1459
 
1460
        <h5 class="phpdocumentor-return-value__heading">Return values</h5>
1461
    <span class="phpdocumentor-signature__response_type">string</span>
1462
            &mdash;
1463
            <section class="phpdocumentor-description"><p>HTML code for display</p>
1464
</section>
1465
 
1466
 
1467
</article>
1468
                    <article
1469
        class="phpdocumentor-element
1470
            -method
1471
            -protected
1472
                                                        "
1473
>
1474
    <h4 class="phpdocumentor-element__name" id="method_makeHTMLField">
1475
        makeHTMLField()
1476
        <a href="classes/Users.html#method_makeHTMLField" class="headerlink"><i class="fas fa-link"></i></a>
1477
    </h4>
1478
    <aside class="phpdocumentor-element-found-in">
1479
    <abbr class="phpdocumentor-element-found-in__file" title="Users.class.php"><a href="files/users-class.html"><abbr title="Users.class.php">Users.class.php</abbr></a></abbr>
1480
    :
1481
    <span class="phpdocumentor-element-found-in__line">339</span>
1482
 
1483
    </aside>
1484
 
1485
        <p class="phpdocumentor-summary">Creates an HTML field for display</p>
1486
 
1487
    <code class="phpdocumentor-code phpdocumentor-signature ">
1488
    <span class="phpdocumentor-signature__visibility">protected</span>
1489
                <span class="phpdocumentor-signature__name">makeHTMLField</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$field</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, string&gt;&nbsp;</span><span class="phpdocumentor-signature__argument__name">$record</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$value</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">string</span></code>
1490
 
1491
        <section class="phpdocumentor-description"><p>Retrieves the template for the record type, then populates it from
1492
$record, $value and $field. The template MUST have %s's in the
1493
following order for an HTML INPUT field
1494
label=
1495
name=
1496
title=
1497
placeholder=
1498
value</p>
1499
<p>Knows how to handle INPUT types TEXT, TEXTAREA, PASSWORD and
1500
special html type boolean, which is checkboxes.</p>
1501
</section>
1502
 
1503
        <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
1504
    <dl class="phpdocumentor-argument-list">
1505
                    <dt class="phpdocumentor-argument-list__entry">
1506
                <span class="phpdocumentor-signature__argument__name">$field</span>
1507
                : <span class="phpdocumentor-signature__argument__return-type">string</span>
1508
                            </dt>
1509
            <dd class="phpdocumentor-argument-list__definition">
1510
                    <section class="phpdocumentor-description"><p>name of the field to populate</p>
1511
</section>
1512
 
1513
            </dd>
1514
                    <dt class="phpdocumentor-argument-list__entry">
1515
                <span class="phpdocumentor-signature__argument__name">$record</span>
1516
                : <span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, string&gt;</span>
1517
                            </dt>
1518
            <dd class="phpdocumentor-argument-list__definition">
1519
                    <section class="phpdocumentor-description"><p>Record from $configuration[...][fields]</p>
1520
</section>
1521
 
1522
            </dd>
1523
                    <dt class="phpdocumentor-argument-list__entry">
1524
                <span class="phpdocumentor-signature__argument__name">$value</span>
1525
                : <span class="phpdocumentor-signature__argument__return-type">string</span>
1526
                            </dt>
1527
            <dd class="phpdocumentor-argument-list__definition">
1528
                    <section class="phpdocumentor-description"><p>the current value to put in INPUT</p>
1529
</section>
1530
 
1531
            </dd>
1532
            </dl>
1533
 
1534
 
1535
 
1536
        <h5 class="phpdocumentor-return-value__heading">Return values</h5>
1537
    <span class="phpdocumentor-signature__response_type">string</span>
1538
            &mdash;
1539
            <section class="phpdocumentor-description"><p>An HTML INPUT entity</p>
1540
</section>
1541
 
1542
 
1543
</article>
1544
                    <article
1545
        class="phpdocumentor-element
1546
            -method
1547
            -protected
1548
                                                        "
1549
>
1550
    <h4 class="phpdocumentor-element__name" id="method_validate">
1551
        validate()
1552
        <a href="classes/UsersPermissions.html#method_validate" class="headerlink"><i class="fas fa-link"></i></a>
1553
    </h4>
1554
    <aside class="phpdocumentor-element-found-in">
1555
    <abbr class="phpdocumentor-element-found-in__file" title="UsersPermissions.class.php"><a href="files/userspermissions-class.html"><abbr title="UsersPermissions.class.php">UsersPermissions.class.php</abbr></a></abbr>
1556
    :
1557
    <span class="phpdocumentor-element-found-in__line">78</span>
1558
 
1559
    </aside>
1560
 
1561
        <p class="phpdocumentor-summary">Extends Users::validate</p>
1562
 
1563
    <code class="phpdocumentor-code phpdocumentor-signature ">
1564
    <span class="phpdocumentor-signature__visibility">protected</span>
1565
                <span class="phpdocumentor-signature__name">validate</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$username</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$password</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type"><abbr title="\usersPermissionsDataSource">usersPermissionsDataSource</abbr>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$connection</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
1566
 
1567
        <section class="phpdocumentor-description"><p>Loads permissions if user was validated</p>
1568
</section>
1569
 
1570
        <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
1571
    <dl class="phpdocumentor-argument-list">
1572
                    <dt class="phpdocumentor-argument-list__entry">
1573
                <span class="phpdocumentor-signature__argument__name">$username</span>
1574
                : <span class="phpdocumentor-signature__argument__return-type">string</span>
1575
                            </dt>
1576
            <dd class="phpdocumentor-argument-list__definition">
1577
 
1578
            </dd>
1579
                    <dt class="phpdocumentor-argument-list__entry">
1580
                <span class="phpdocumentor-signature__argument__name">$password</span>
1581
                : <span class="phpdocumentor-signature__argument__return-type">string</span>
1582
                            </dt>
1583
            <dd class="phpdocumentor-argument-list__definition">
1584
 
1585
            </dd>
1586
                    <dt class="phpdocumentor-argument-list__entry">
1587
                <span class="phpdocumentor-signature__argument__name">$connection</span>
1588
                : <span class="phpdocumentor-signature__argument__return-type"><abbr title="\usersPermissionsDataSource">usersPermissionsDataSource</abbr></span>
1589
                            </dt>
1590
            <dd class="phpdocumentor-argument-list__definition">
1591
 
1592
            </dd>
1593
            </dl>
1594
 
1595
 
1596
    <h5 class="phpdocumentor-tag-list__heading" id="tags">
1597
        Tags
1598
        <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
1599
    </h5>
1600
    <dl class="phpdocumentor-tag-list">
1601
                                    <dt class="phpdocumentor-tag-list__entry">
1602
                    <span class="phpdocumentor-tag__name">returns</span>
1603
                </dt>
1604
                <dd class="phpdocumentor-tag-list__definition">
1605
 
1606
                                                 <section class="phpdocumentor-description"><p>boolean true if username/password are correct</p>
1607
</section>
1608
 
1609
                                    </dd>
1610
                        </dl>
1611
 
1612
        <h5 class="phpdocumentor-return-value__heading">Return values</h5>
1613
    <span class="phpdocumentor-signature__response_type">mixed</span>
1614
            &mdash;
1615
 
1616
 
1617
</article>
1618
            </section>
1619
 
1620
 
1621
    <script type="text/javascript">
1622
        function loadExternalCodeSnippets(line) {
1623
            Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach((pre) => {
1624
                var src = pre.getAttribute('data-src').replace( /\\/g, '/');
1625
                var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
1626
                var language = 'php';
1627
 
1628
                var code = document.createElement('code');
1629
                code.className = 'language-' + language;
1630
 
1631
                pre.textContent = '';
1632
 
1633
                pre.setAttribute('data-line', line)
1634
                code.textContent = 'Loading…';
1635
 
1636
                pre.appendChild(code);
1637
 
1638
                var xhr = new XMLHttpRequest();
1639
 
1640
                xhr.open('GET', src, true);
1641
 
1642
                xhr.onreadystatechange = function () {
1643
                    if (xhr.readyState == 4) {
1644
 
1645
                        if (xhr.status < 400 && xhr.responseText) {
1646
                            code.textContent = xhr.responseText;
1647
 
1648
                            Prism.highlightElement(code);
1649
                        }
1650
                        else if (xhr.status >= 400) {
1651
                            code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
1652
                        }
1653
                        else {
1654
                            code.textContent = '✖ Error: File does not exist, is empty or trying to view from localhost';
1655
                        }
1656
                    }
1657
                };
1658
 
1659
                xhr.send(null);
1660
            });
1661
        }
1662
 
1663
        var modals = document.querySelectorAll("[data-modal]");
1664
 
1665
        modals.forEach(function (trigger) {
1666
            trigger.addEventListener("click", function (event) {
1667
                //event.preventDefault();
1668
                const modal = document.getElementById(trigger.dataset.modal);
1669
                modal.classList.add("phpdocumentor-modal__open");
1670
                loadExternalCodeSnippets(trigger.dataset.line)
1671
                const exits = modal.querySelectorAll("[data-exit-button]");
1672
                exits.forEach(function (exit) {
1673
                    exit.addEventListener("click", function (event) {
1674
                        event.preventDefault();
1675
                        modal.classList.remove("phpdocumentor-modal__open");
1676
                    });
1677
                });
1678
            });
1679
        });
1680
    </script>
1681
 
1682
    </article>
1683
                <section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
1684
    <section class="phpdocumentor-search-results__dialog">
1685
        <header class="phpdocumentor-search-results__header">
1686
            <h2 class="phpdocumentor-search-results__title">Search results</h2>
1687
            <button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
1688
        </header>
1689
        <section class="phpdocumentor-search-results__body">
1690
            <ul class="phpdocumentor-search-results__entries"></ul>
1691
        </section>
1692
    </section>
1693
</section>
1694
            </div>
1695
        </div>
1696
        <a href="classes/UsersPermissions.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
1697
 
1698
    </main>
1699
 
1700
    <script>
1701
        cssVars({});
1702
    </script>
1703
    <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
1704
    <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
1705
    <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
1706
    <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
1707
</body>
1708
</html>