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_relay = '<?php echo get_auth_relay() ?>';
var user = {
<?php if ( $user ) { ?>
"Id" : "<?php echo $user['Id'] ?>",
"Username" : "<?php echo $user['Username'] ?>"
<?php } ?>
};
var user = <?php
unset($user['Password']);
echo json_encode($user);
?>;
var running = <?php echo daemonCheck()?'true':'false' ?>;