@@ -176,6 +176,7 @@ public function exists()
176
176
*/
177
177
public function getUID ()
178
178
{
179
+ assert ($ this ->exists ());
179
180
return $ this ->uid ;
180
181
}
181
182
@@ -189,6 +190,7 @@ public function setOrg($org)
189
190
190
191
public function getOrg ($ ignorecache = false )
191
192
{
193
+ assert ($ this ->exists ());
192
194
if (!$ ignorecache ) {
193
195
$ cached_val = $ this ->REDIS ->getCache ($ this ->getUID (), "org " );
194
196
if (!is_null ($ cached_val )) {
@@ -238,6 +240,7 @@ public function setFirstname($firstname, $operator = null)
238
240
*/
239
241
public function getFirstname ($ ignorecache = false )
240
242
{
243
+ assert ($ this ->exists ());
241
244
if (!$ ignorecache ) {
242
245
$ cached_val = $ this ->REDIS ->getCache ($ this ->getUID (), "firstname " );
243
246
if (!is_null ($ cached_val )) {
@@ -287,6 +290,7 @@ public function setLastname($lastname, $operator = null)
287
290
*/
288
291
public function getLastname ($ ignorecache = false )
289
292
{
293
+ assert ($ this ->exists ());
290
294
if (!$ ignorecache ) {
291
295
$ cached_val = $ this ->REDIS ->getCache ($ this ->getUID (), "lastname " );
292
296
if (!is_null ($ cached_val )) {
@@ -309,6 +313,7 @@ public function getLastname($ignorecache = false)
309
313
310
314
public function getFullname ()
311
315
{
316
+ assert ($ this ->exists ());
312
317
return $ this ->getFirstname () . " " . $ this ->getLastname ();
313
318
}
314
319
@@ -341,6 +346,7 @@ public function setMail($email, $operator = null)
341
346
*/
342
347
public function getMail ($ ignorecache = false )
343
348
{
349
+ assert ($ this ->exists ());
344
350
if (!$ ignorecache ) {
345
351
$ cached_val = $ this ->REDIS ->getCache ($ this ->getUID (), "mail " );
346
352
if (!is_null ($ cached_val )) {
@@ -404,6 +410,7 @@ public function setSSHKeys($keys, $operator = null, $send_mail = true)
404
410
*/
405
411
public function getSSHKeys ($ ignorecache = false )
406
412
{
413
+ assert ($ this ->exists ());
407
414
if (!$ ignorecache ) {
408
415
$ cached_val = $ this ->REDIS ->getCache ($ this ->getUID (), "sshkeys " );
409
416
if (!is_null ($ cached_val )) {
@@ -480,6 +487,7 @@ public function setLoginShell($shell, $operator = null, $send_mail = true)
480
487
*/
481
488
public function getLoginShell ($ ignorecache = false )
482
489
{
490
+ assert ($ this ->exists ());
483
491
if (!$ ignorecache ) {
484
492
$ cached_val = $ this ->REDIS ->getCache ($ this ->getUID (), "loginshell " );
485
493
if (!is_null ($ cached_val )) {
@@ -528,6 +536,7 @@ public function setHomeDir($home, $operator = null)
528
536
*/
529
537
public function getHomeDir ($ ignorecache = false )
530
538
{
539
+ assert ($ this ->exists ());
531
540
if (!$ ignorecache ) {
532
541
$ cached_val = $ this ->REDIS ->getCache ($ this ->getUID (), "homedir " );
533
542
if (!is_null ($ cached_val )) {
0 commit comments