# HG changeset patch # User Zoe Hong # Date 1432733818 -7200 # Node ID 7258ccd8ef7def3602d0858916570315ade60124 # Parent 3abf39f0eb46d1432bd52d06d138abfa4669a1ec new: user need to login in LGServices diff -r 3abf39f0eb46 -r 7258ccd8ef7d check_sections_details.php --- a/check_sections_details.php Wed May 27 14:32:34 2015 +0200 +++ b/check_sections_details.php Wed May 27 15:36:58 2015 +0200 @@ -104,9 +104,16 @@ $output = file_get_contents($lg_url); $user_info = json_decode($output, true); $current_editor = (string)$user_info['userName']; + + if ($current_editor == null) { + // redirect to LGServices homepage + header('Location: http://localgazetteers/LGServices'); + } } else { // test locally + // redirect to LGServices homepage + header('Location: http://localgazetteers/LGServices'); } ?> @@ -179,6 +186,8 @@ var current_editor = ; if (current_editor != "") { $("#saveBook .editor").val(current_editor); + } else { + console.log("You have to login from LGService!"); } }