Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
osticket
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
docker
osticket
Commits
60b73208
Commit
60b73208
authored
12 years ago
by
Peter Rotich
Browse files
Options
Downloads
Patches
Plain Diff
Support auto-login if auth token is available.
parent
7358bf84
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
view.php
+18
-3
18 additions, 3 deletions
view.php
with
18 additions
and
3 deletions
view.php
+
18
−
3
View file @
60b73208
...
...
@@ -3,6 +3,7 @@
view.php
Ticket View.
TODO: Support different views based on auth_token - e.g for BCC'ed users vs. Ticket owner.
Peter Rotich <peter@osticket.com>
Copyright (c) 2006-2010 osTicket
...
...
@@ -14,8 +15,22 @@
vim: expandtab sw=4 ts=4 sts=4:
$Id: $
**********************************************************************/
require
(
'secure.inc.php'
);
if
(
!
is_object
(
$thisclient
)
||
!
$thisclient
->
isValid
())
die
(
'Access denied'
);
//Double check again.
//We are now using tickets.php but we need to keep view.php for backward compatibility
require_once
(
'client.inc.php'
);
//If the user is NOT logged in - try auto-login (if params exists).
if
(
!
$thisclient
||
!
$thisclient
->
isValid
())
{
// * On login Client::login will redirect the user to tickets.php view.
// * See TODO above for planned multi-view.
$user
=
null
;
if
(
$_GET
[
't'
]
&&
$_GET
[
'e'
]
&&
$_GET
[
'a'
])
$user
=
Client
::
login
(
$_GET
[
't'
],
$_GET
[
'e'
],
$_GET
[
'a'
],
$errors
);
//XXX: For now we're assuming the user is the ticket owner
// (multi-view based on auth token will come later).
if
(
$user
&&
$user
->
getTicketID
()
==
trim
(
$_GET
[
't'
]))
@
header
(
'Location: tickets.php?id='
.
$user
->
getTicketID
());
}
//Simply redirecting to tickets.php until multiview is implemented.
require
(
'tickets.php'
);
?>
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