Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
78424fee
Commit
78424fee
authored
9 years ago
by
rswindell
Browse files
Options
Downloads
Patches
Plain Diff
Fix user logged-in detection: if user.number==0, you're not logged-in.
parent
7382671f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
web/root/ecwebv3/pages/Templates/999-ssjs.ssjs
+2
-2
2 additions, 2 deletions
web/root/ecwebv3/pages/Templates/999-ssjs.ssjs
web/root/ecwebv3/sidebar/001-login.ssjs
+1
-1
1 addition, 1 deletion
web/root/ecwebv3/sidebar/001-login.ssjs
with
3 additions
and
3 deletions
web/root/ecwebv3/pages/Templates/999-ssjs.ssjs
+
2
−
2
View file @
78424fee
...
...
@@ -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
);
This diff is collapsed.
Click to expand it.
web/root/ecwebv3/sidebar/001-login.ssjs
+
1
−
1
View file @
78424fee
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
(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment