use json_encode($User) instead of specific elements. For some reason $user['Id'] isn't defined for me atm.

This commit is contained in:
Isaac Connor 2021-03-30 18:20:23 -04:00
parent a1364a2b2b
commit 3d01008510
1 changed files with 4 additions and 6 deletions

View File

@ -83,10 +83,8 @@ var imagePrefix = "<?php echo '?view=image&eid=' ?>";
var auth_hash = '<?php echo generateAuthHash(ZM_AUTH_HASH_IPS) ?>'; var auth_hash = '<?php echo generateAuthHash(ZM_AUTH_HASH_IPS) ?>';
var auth_relay = '<?php echo get_auth_relay() ?>'; var auth_relay = '<?php echo get_auth_relay() ?>';
var user = { var user = <?php
<?php if ( $user ) { ?> unset($user['Password']);
"Id" : "<?php echo $user['Id'] ?>", echo json_encode($user);
"Username" : "<?php echo $user['Username'] ?>" ?>;
<?php } ?>
};
var running = <?php echo daemonCheck()?'true':'false' ?>; var running = <?php echo daemonCheck()?'true':'false' ?>;