Skip to content
Snippets Groups Projects
Commit 78424fee authored by rswindell's avatar rswindell
Browse files

Fix user logged-in detection: if user.number==0, you're not logged-in.

parent 7382671f
No related branches found
No related tags found
No related merge requests found
......@@ -12,7 +12,7 @@ print("This is a Server-Side Javascript page. It's more cumbersome than an");
print("XJS page, but can be useful in certain situations.<br /><br />");
// SSJS example:
if(user.alias == webIni.WebGuest)
if(!user.number || user.alias == webIni.WebGuest)
print("You are not logged in.");
else
print("You are logged in as " + user.alias);
print("You are logged in as " + user.alias + " #" + user.number);
if(user.alias.toUpperCase() != webIni.WebGuest.toUpperCase()) {
if(user.number && user.alias.toUpperCase() != webIni.WebGuest.toUpperCase()) {
print("You are logged in as <b>" + user.alias + "</b><br />");
print(
format(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment