This repository has been archived by the owner on Aug 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 38
/
reference.html
534 lines (497 loc) · 28.7 KB
/
reference.html
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
521
522
523
524
525
526
527
528
529
530
531
532
533
534
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<style type="text/css">
* { margin: 0px; padding: 0px; }
body
{
padding: 30px;
font-family: Calibri, Verdana, "Sans Serif";
font-size: 12px;
}
table
{
width: 800px;
margin: 0px auto;
}
th, td
{
padding: 3px;
}
.right
{
text-align: right;
}
h1
{
color: #FF0000;
border-bottom: 2px solid #000000;
margin-bottom: 15px;
}
p { margin: 10px 0px; }
p.faded { color: #505050; }
ul
{
margin: 20px;
}
</style>
</head>
<body>
<h1>SimpleUsers Method and Member reference</h1>
<h2>Index</h2>
<ul>
<li><a href="#construct">SimpleUsers::__construct()</a></li>
<li><a href="#createUser">SimpleUsers::createUser( string $username, string $password )</a></li>
<li><a href="#loginUser">SimpleUsers::loginUser( string $username, string $password )</a></li>
<li><a href="#setInfo">SimpleUsers::setInfo( string $key, string $value [, int $userId] )</a></li>
<li><a href="#getInfo">SimpleUsers::getInfo( string $key [, int $userId] )</a></li>
<li><a href="#getInfoArray">SimpleUsers::getInfoArray( [int $userId] )</a></li>
<li><a href="#logoutUser">SimpleUsers::logoutUser()</a></li>
<li><a href="#setPassword">SimpleUsers::setPassword( string $password [, int $userId] )</a></li>
<li><a href="#getUsers">SimpleUsers::getUsers()</a></li>
<li><a href="#getSingleUser">SimpleUsers::getSingleUser( [int $userId] )</a></li>
<li><a href="#deleteUser">SimpleUsers::deleteUser( int $userId )</a></li>
<li><a href="#logged_in">SimpleUsers::logged_in</a></li>
<li><a href="#userdata">SimpleUsers::userdata</a></li>
</ul>
<h2>Methods</h2>
<p id="construct">
<strong>SimpleUsers::__construct()</strong>
</p>
<p class="faded">
Object construct verifies that a session has been started and that a MySQL connection can be established.<br />
It takes no parameters.
</p>
<p>
<fieldset>
<legend>Example</legend>
<code>
<span style="color: #0000BB"><?php<br /> $SimpleUsers </span><span style="color: #007700">= new </span><span style="color: #0000BB">SimpleUsers</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">?><br /></span>
</span>
</code>
</fieldset>
</p>
<p id="createUser">
<strong>SimpleUsers::createUser( string $username, string $password )</strong>
</p>
<p class="faded">
Returns a (int)user id, if the user was created succesfully.
If not, it returns (bool)false.
</p>
<p>
<fieldset>
<legend>Example</legend>
<code><span style="color: #000000">
<span style="color: #0000BB"><?php
<br />
<br /> $SimpleUsers </span><span style="color: #007700">= new </span><span style="color: #0000BB">SimpleUsers</span><span style="color: #007700">();
<br />
<br /> </span><span style="color: #0000BB">$res </span><span style="color: #007700">= </span><span style="color: #0000BB">$SimpleUsers</span><span style="color: #007700">-></span><span style="color: #0000BB">createUser</span><span style="color: #007700">(</span><span style="color: #DD0000">"John"</span><span style="color: #007700">, </span><span style="color: #DD0000">"qwerty"</span><span style="color: #007700">);
<br /> if( </span><span style="color: #0000BB">$res </span><span style="color: #007700">)
<br /> echo </span><span style="color: #DD0000">"User was created with userId: "</span><span style="color: #007700">.</span><span style="color: #0000BB">$res</span><span style="color: #007700">;
<br /> else
<br /> echo </span><span style="color: #DD0000">"The username was already taken."</span><span style="color: #007700">;
<br />
<br /></span><span style="color: #0000BB">?></span>
</span>
</code>
</fieldset>
</p>
<p id="loginUser">
<strong>SimpleUsers::loginUser( string $username, string $password )</strong>
</p>
<p class="faded">
Pairs up username and password as registrered in the database.<br />
If the username and password is correct, it will return (int)user id of
the user which credentials has been passed and set the session, for
use by the user validating.
</p>
<p>
<fieldset>
<legend>Example</legend>
<code><span style="color: #000000">
<span style="color: #0000BB"><?php
<br />
<br /> $SimpleUsers </span><span style="color: #007700">= new </span><span style="color: #0000BB">SimpleUsers</span><span style="color: #007700">();
<br />
<br /> </span><span style="color: #0000BB">$res </span><span style="color: #007700">= </span><span style="color: #0000BB">$SimpleUsers</span><span style="color: #007700">-></span><span style="color: #0000BB">loginUser</span><span style="color: #007700">(</span><span style="color: #DD0000">"John"</span><span style="color: #007700">, </span><span style="color: #DD0000">"qwerty"</span><span style="color: #007700">);
<br />
<br /> if( </span><span style="color: #0000BB">$res </span><span style="color: #007700">)
<br /> {
<br /> </span><span style="color: #0000BB">header</span><span style="color: #007700">(</span><span style="color: #DD0000">"Location: ..."</span><span style="color: #007700">);
<br /> exit;
<br /> }
<br /> else
<br /> {
<br /> echo </span><span style="color: #DD0000">"You passed the wrong credentials."</span><span style="color: #007700">;
<br /> }
<br />
<br /></span><span style="color: #0000BB">?></span>
</span>
</code>
</fieldset>
</p>
<p id="setInfo">
<strong>SimpleUsers::setInfo( string $key, string $value [, int $userId] )</strong>
</p>
<p class="faded">
Sets a custom information pair, consisting of a key name and that keys value for a user.
Setting the third parameter sets the provided information for a given user, instead of the one calling it.
</p>
<p>
<fieldset>
<legend>Example #1</legend>
<code><span style="color: #000000">
<span style="color: #0000BB"><?php
<br />
<br /> $SimpleUsers </span><span style="color: #007700">= new </span><span style="color: #0000BB">SimpleUsers</span><span style="color: #007700">();
<br />
<br /> </span><span style="color: #FF8000">// Store information for the current user
<br /> </span><span style="color: #0000BB">$SimpleUsers</span><span style="color: #007700">-></span><span style="color: #0000BB">setInfo</span><span style="color: #007700">(</span><span style="color: #DD0000">"fullname"</span><span style="color: #007700">, </span><span style="color: #DD0000">"John Doe"</span><span style="color: #007700">);
<br /></span><span style="color: #0000BB">?></span>
</span>
</code>
</fieldset>
</p>
<p>
<fieldset>
<legend>Example #2</legend>
<code><span style="color: #000000">
<span style="color: #0000BB"><?php
<br />
<br /> $SimpleUsers </span><span style="color: #007700">= new </span><span style="color: #0000BB">SimpleUsers</span><span style="color: #007700">();
<br />
<br /> </span><span style="color: #FF8000">// Store information for the user with userId provided in the third parameter.
<br /> // This is useful for administrators when wanting to assign, edit or empty stored information about a user
<br /> </span><span style="color: #0000BB">$SimpleUsers</span><span style="color: #007700">-></span><span style="color: #0000BB">setInfo</span><span style="color: #007700">(</span><span style="color: #DD0000">"fullname"</span><span style="color: #007700">, </span><span style="color: #DD0000">"John Doe"</span><span style="color: #007700">, </span><span style="color: #0000BB">354</span><span style="color: #007700">);
<br /></span><span style="color: #0000BB">?></span>
</span>
</code>
</fieldset>
</p>
<p id="getInfo">
<strong>SimpleUsers::getInfo( string $key [, int $userId] )</strong>
</p>
<p class="faded">
Use this function to retrieve stored custom user information.<br />
Setting the third parameter gets the stored information for a given user, instead of the one calling it.
</p>
<p>
<fieldset>
<legend>Example #1</legend>
<code><span style="color: #000000">
<span style="color: #0000BB"><?php
<br />
<br /> $SimpleUsers </span><span style="color: #007700">= new </span><span style="color: #0000BB">SimpleUsers</span><span style="color: #007700">();
<br />
<br /> </span><span style="color: #FF8000">// Get stored information for the active user
<br /> </span><span style="color: #0000BB">$fullname </span><span style="color: #007700">= </span><span style="color: #0000BB">$SimpleUsers</span><span style="color: #007700">-></span><span style="color: #0000BB">getInfo</span><span style="color: #007700">(</span><span style="color: #DD0000">"fullname"</span><span style="color: #007700">);
<br /></span><span style="color: #0000BB">?></span>
</span>
</code>
</fieldset>
</p>
<p>
<fieldset>
<legend>Example #2</legend>
<code><span style="color: #000000">
<span style="color: #0000BB"><?php
<br />
<br /> $SimpleUsers </span><span style="color: #007700">= new </span><span style="color: #0000BB">SimpleUsers</span><span style="color: #007700">();
<br />
<br /> </span><span style="color: #FF8000">// Get stored information for the user with userId provided in the third parameter.
<br /> // This is useful for administrators when wanting to retrieve stored information about a user
<br /> </span><span style="color: #0000BB">$fullname </span><span style="color: #007700">= </span><span style="color: #0000BB">$SimpleUsers</span><span style="color: #007700">-></span><span style="color: #0000BB">getInfo</span><span style="color: #007700">(</span><span style="color: #DD0000">"fullname"</span><span style="color: #007700">, </span><span style="color: #0000BB">354</span><span style="color: #007700">);
<br /></span><span style="color: #0000BB">?></span>
</span>
</code>
</fieldset>
</p>
<p id="getInfoArray">
<strong>SimpleUsers::getInfoArray( [int $userId] )</strong>
</p>
<p class="faded">
Returns an associative array with all the custom information stored about the current user.<br />
Passing a userId as a parameter will return an associative array with all the custom information for that specific user.
</p>
<p>
<fieldset>
<legend>Example #1</legend>
<code><span style="color: #000000">
<span style="color: #0000BB"><?php
<br />
<br /> $SimpleUsers </span><span style="color: #007700">= new </span><span style="color: #0000BB">SimpleUsers</span><span style="color: #007700">();
<br />
<br /> </span><span style="color: #FF8000">// Gets all stored information for the active user and returns an associative array
<br /> </span><span style="color: #0000BB">$info </span><span style="color: #007700">= </span><span style="color: #0000BB">$SimpleUsers</span><span style="color: #007700">-></span><span style="color: #0000BB">getInfoArray</span><span style="color: #007700">();
<br />
<br /> </span><span style="color: #0000BB">print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">$info</span><span style="color: #007700">);
<br /></span><span style="color: #0000BB">?></span>
</span>
</code>
</fieldset>
</p>
<p>
<fieldset>
<legend>Example #2</legend>
<code><span style="color: #000000">
<span style="color: #0000BB"><?php
<br />
<br /> $SimpleUsers </span><span style="color: #007700">= new </span><span style="color: #0000BB">SimpleUsers</span><span style="color: #007700">();
<br />
<br /> </span><span style="color: #FF8000">// Gets all stored information for a given user and returns an associative array
<br /> // This is useful for administrators when wanting to get all stored information about a user
<br /> </span><span style="color: #0000BB">$info </span><span style="color: #007700">= </span><span style="color: #0000BB">$SimpleUsers</span><span style="color: #007700">-></span><span style="color: #0000BB">getInfoArray</span><span style="color: #007700">(</span><span style="color: #0000BB">354</span><span style="color: #007700">);
<br />
<br /> </span><span style="color: #0000BB">print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">$info</span><span style="color: #007700">);
<br /></span><span style="color: #0000BB">?></span>
</span>
</code>
</fieldset>
</p>
<p id="logoutUser">
<strong>SimpleUsers::logoutUser()</strong>
</p>
<p class="faded">
Logout the active user, unsetting the users session.
</p>
<p>
<fieldset>
<legend>Example</legend>
<code><span style="color: #000000">
<span style="color: #0000BB"><?php
<br />
<br /> $SimpleUsers </span><span style="color: #007700">= new </span><span style="color: #0000BB">SimpleUsers</span><span style="color: #007700">();
<br />
<br /> </span><span style="color: #0000BB">$SimpleUsers</span><span style="color: #007700">-></span><span style="color: #0000BB">logoutUser</span><span style="color: #007700">();
<br /></span><span style="color: #0000BB">?></span>
</span>
</code>
</fieldset>
</p>
<p id="setPassword">
<strong>SimpleUsers::setPassword( string $password [, int $userId] )</strong>
</p>
<p class="faded">
Update the users password with this function.<br />
It generates a new salt and a sets the users password provided by the first parameter.<br />
Providing a userId in the second paramater will set the password for that specific user.
</p>
<p>
<fieldset>
<legend>Example #1</legend>
<code><span style="color: #000000">
<span style="color: #0000BB"><?php
<br />
<br /> $SimpleUsers </span><span style="color: #007700">= new </span><span style="color: #0000BB">SimpleUsers</span><span style="color: #007700">();
<br />
<br /> </span><span style="color: #FF8000">// Sets a new password for the current active user
<br /> </span><span style="color: #0000BB">$SimpleUsers</span><span style="color: #007700">-></span><span style="color: #0000BB">setPassword</span><span style="color: #007700">(</span><span style="color: #DD0000">"difficult"</span><span style="color: #007700">);
<br /></span><span style="color: #0000BB">?></span>
</span>
</code>
</fieldset>
</p>
<p>
<fieldset>
<legend>Example #2</legend>
<code><span style="color: #000000">
<span style="color: #0000BB"><?php
<br />
<br /> $SimpleUsers </span><span style="color: #007700">= new </span><span style="color: #0000BB">SimpleUsers</span><span style="color: #007700">();
<br />
<br /> </span><span style="color: #FF8000">// Sets a new password for the userId identified by the second parameter.
<br /> // This is useful if an administrative action is needed for setting a new password.
<br /> </span><span style="color: #0000BB">$SimpleUsers</span><span style="color: #007700">-></span><span style="color: #0000BB">setPassword</span><span style="color: #007700">(</span><span style="color: #DD0000">"difficult"</span><span style="color: #007700">, </span><span style="color: #0000BB">354</span><span style="color: #007700">);
<br /></span><span style="color: #0000BB">?></span>
</span>
</code>
</fieldset>
</p>
<p id="getUsers">
<strong>SimpleUsers::getUsers()</strong>
</p>
<p class="faded">
Gives you an array with all registered users and their basic information (last activity, creation date, username and userId)
</p>
<p>
<fieldset>
<legend>Example</legend>
<code><span style="color: #000000">
<span style="color: #0000BB"><?php
<br />
<br /> $SimpleUsers </span><span style="color: #007700">= new </span><span style="color: #0000BB">SimpleUsers</span><span style="color: #007700">();
<br />
<br /> </span><span style="color: #0000BB">$users </span><span style="color: #007700">= </span><span style="color: #0000BB">$SimpleUsers</span><span style="color: #007700">-></span><span style="color: #0000BB">getUsers</span><span style="color: #007700">();
<br />
<br /> </span><span style="color: #0000BB">print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">$users</span><span style="color: #007700">);
<br /></span><span style="color: #0000BB">?></span>
</span>
</code>
</fieldset>
</p>
<p id="getSingleUser">
<strong>SimpleUsers::getSingleUser( [int $userId] )</strong>
</p>
<p class="faded">
Gives you an associative array, containing the basic information (last activity, creation date, username and userId) for the current active user.<br />
If a userId is provided as parameter, the returned associative array will contain the basic information for that specific user.
</p>
<p>
<fieldset>
<legend>Example #1</legend>
<code><span style="color: #000000">
<span style="color: #0000BB"><?php
<br />
<br /> $SimpleUsers </span><span style="color: #007700">= new </span><span style="color: #0000BB">SimpleUsers</span><span style="color: #007700">();
<br />
<br /> </span><span style="color: #0000BB">$user </span><span style="color: #007700">= </span><span style="color: #0000BB">$SimpleUsers</span><span style="color: #007700">-></span><span style="color: #0000BB">getSingleUser</span><span style="color: #007700">();
<br />
<br /> </span><span style="color: #0000BB">print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">$user</span><span style="color: #007700">);
<br /></span><span style="color: #0000BB">?></span>
</span>
</code>
</fieldset>
</p>
<p>
<fieldset>
<legend>Example #2</legend>
<code><span style="color: #000000">
<span style="color: #0000BB"><?php
<br />
<br /> $SimpleUsers </span><span style="color: #007700">= new </span><span style="color: #0000BB">SimpleUsers</span><span style="color: #007700">();
<br />
<br /> </span><span style="color: #FF8000">// Retrieving the basic information for a specific user.
<br /> // This is useful for administrative purposes.
<br /> </span><span style="color: #0000BB">$user </span><span style="color: #007700">= </span><span style="color: #0000BB">$SimpleUsers</span><span style="color: #007700">-></span><span style="color: #0000BB">getSingleUser</span><span style="color: #007700">(</span><span style="color: #0000BB">354</span><span style="color: #007700">);
<br />
<br /> </span><span style="color: #0000BB">print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">$user</span><span style="color: #007700">);
<br /></span><span style="color: #0000BB">?></span>
</span>
</code>
</fieldset>
</p>
<p id="deleteUser">
<strong>SimpleUsers::deleteUser( int $userId )</strong>
</p>
<p class="faded">
Deletes a given user and stored custom information with it.
</p>
<p>
<fieldset>
<legend>Example</legend>
<code><span style="color: #000000">
<span style="color: #0000BB"><?php
<br />
<br /> $SimpleUsers </span><span style="color: #007700">= new </span><span style="color: #0000BB">SimpleUsers</span><span style="color: #007700">();
<br />
<br /> </span><span style="color: #0000BB">$SimpleUsers</span><span style="color: #007700">-></span><span style="color: #0000BB">deleteUser</span><span style="color: #007700">(</span><span style="color: #0000BB">354</span><span style="color: #007700">);
<br /></span><span style="color: #0000BB">?></span>
</span>
</code>
</fieldset>
</p>
<p id="getToken">
<strong>SimpleUsers::getToken( [bool] )</strong>
</p>
<p class="faded">
Returns a hidden input field with a unique token value for CSRF to be used with post data.<br />
The token is saved in a session for later validation.<br />
The boolean parameter is default set to true which returns the input field as XHTML - provide (bool) false for HTML 4 compliance.
</p>
<p>
<fieldset>
<legend>Example</legend>
<code><span style="color: #000000">
<span style="color: #0000BB"><?php
<br /> $SimpleUsers </span><span style="color: #007700">= new </span><span style="color: #0000BB">SimpleUsers</span><span style="color: #007700">();
<br /></span><span style="color: #0000BB">?>
<br /></span><form method="post" action="...">
<br /> <input ...>
<br /> <span style="color: #0000BB"><?php </span><span style="color: #007700">echo </span><span style="color: #0000BB">$SimpleUsers</span><span style="color: #007700">-></span><span style="color: #0000BB">getToken</span><span style="color: #007700">(); </span><span style="color: #0000BB">?>
<br /></span></form>
<br /></span>
</code>
</fieldset>
</p>
<p id="getToken">
<strong>SimpleUsers::validateToken()</strong>
</p>
<p class="faded">
Use this method when you wish to validate the CSRF token from your post data.<br />
The method returns true upon validation, otherwise false.
</p>
<p>
<fieldset>
<legend>Example</legend>
<code><span style="color: #000000">
<span style="color: #0000BB"><?php
<br />
<br /> $SimpleUsers </span><span style="color: #007700">= new </span><span style="color: #0000BB">SimpleUsers</span><span style="color: #007700">();
<br />
<br /> </span><span style="color: #0000BB">$csrf </span><span style="color: #007700">= </span><span style="color: #0000BB">$SimpleUsers</span><span style="color: #007700">-></span><span style="color: #0000BB">validateToken</span><span style="color: #007700">();
<br />
<br /> if(!</span><span style="color: #0000BB">$csrf</span><span style="color: #007700">)
<br /> {
<br /> </span><span style="color: #0000BB">header</span><span style="color: #007700">(</span><span style="color: #DD0000">"Location: request_denied.php"</span><span style="color: #007700">);
<br /> exit;
<br /> }
<br />
<br /> </span><span style="color: #FF8000">// Otherwise, continue with processing
<br />
<br /></span><span style="color: #0000BB">?></span>
</span>
</code>
</fieldset>
</p>
<h2>Members</h2>
<p id="logged_in">
<strong>SimpleUsers::logged_in</strong>
</p>
<p class="faded">
This tells wether a user is logged in or not.<br />
Value is (bool)true or (bool)false.
</p>
<p>
<fieldset>
<legend>Example</legend>
<code><span style="color: #000000">
<span style="color: #0000BB"><?php
<br />
<br /> $SimpleUsers </span><span style="color: #007700">= new </span><span style="color: #0000BB">SimpleUsers</span><span style="color: #007700">();
<br />
<br /> if( </span><span style="color: #0000BB">$SimpleUsers</span><span style="color: #007700">-></span><span style="color: #0000BB">logged_in </span><span style="color: #007700">)
<br /> echo </span><span style="color: #DD0000">"You are logged in"</span><span style="color: #007700">;
<br /> else
<br /> echo </span><span style="color: #DD0000">"You are NOT logged in!"</span><span style="color: #007700">;
<br /></span><span style="color: #0000BB">?></span>
</span>
</code>
</fieldset>
</p>
<p id="userdata">
<strong>SimpleUsers::userdata</strong>
</p>
<p class="faded">
This is auto-populated array containing the information stored for the logged in user.<br />
If no user is logged in, this member consists of an empty array.
</p>
<p>
<fieldset>
<legend>Example</legend>
<code><span style="color: #000000">
<span style="color: #0000BB"><?php
<br />
<br /> $SimpleUsers </span><span style="color: #007700">= new </span><span style="color: #0000BB">SimpleUsers</span><span style="color: #007700">();
<br />
<br /> if( </span><span style="color: #0000BB">$SimpleUsers</span><span style="color: #007700">-></span><span style="color: #0000BB">logged_in </span><span style="color: #007700">)
<br /> echo </span><span style="color: #DD0000">"Hello " </span><span style="color: #007700">. </span><span style="color: #0000BB">$SimpleUsers</span><span style="color: #007700">-></span><span style="color: #0000BB">userdata</span><span style="color: #007700">[</span><span style="color: #DD0000">"uUsername"</span><span style="color: #007700">] . </span><span style="color: #DD0000">" - your last activity was at " </span><span style="color: #007700">. </span><span style="color: #0000BB">$SimpleUsers</span><span style="color: #007700">-></span><span style="color: #0000BB">userdata</span><span style="color: #007700">[</span><span style="color: #DD0000">"uActivity"</span><span style="color: #007700">];
<br />
<br /></span><span style="color: #0000BB">?></span> </span>
</code>
</fieldset>
</p>
</body>
</html>