Mercurial > hg > LGToc
changeset 6:4d59439c8b46
New: get user name from LGService by sessionId
author | Zoe Hong <zhong@mpiwg-berlin.mpg.de> |
---|---|
date | Tue, 21 Apr 2015 15:00:19 +0200 |
parents | 26ed9d1d6957 |
children | 3abf39f0eb46 |
files | check_sections_details.php |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/check_sections_details.php Tue Apr 21 14:53:09 2015 +0200 +++ b/check_sections_details.php Tue Apr 21 15:00:19 2015 +0200 @@ -100,7 +100,7 @@ $lg_url = "http://localgazetteers-dev/LGServices/rest/utils/getUser?sessionId=".$session_id; // url to get username from LGService $output = file_get_contents($lg_url); $user_info = json_decode($output, true); - $current_editor = $user_info['userName']; + $current_editor = (string)$user_info['userName']; } else { // test locally @@ -173,7 +173,7 @@ <script type="text/javascript"> function setCurrentEditor() { // current_editor is gotten from LGService - var current_editor = JSON.parse('<?php echo json_encode($current_editor) ?>'); + var current_editor = <?php echo json_encode($current_editor) ?>; if (current_editor != "") { $("#saveBook .editor").val(current_editor); }