Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
osticket
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
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
89b28923
Commit
89b28923
authored
11 years ago
by
Jared Hancock
Browse files
Options
Downloads
Patches
Plain Diff
Add profile management page
parent
aa0ed190
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/client/header.inc.php
+3
-2
3 additions, 2 deletions
include/client/header.inc.php
include/client/profile.inc.php
+25
-0
25 additions, 0 deletions
include/client/profile.inc.php
profile.php
+35
-0
35 additions, 0 deletions
profile.php
with
63 additions
and
2 deletions
include/client/header.inc.php
+
3
−
2
View file @
89b28923
...
@@ -44,8 +44,9 @@ header("Content-Type: text/html; charset=UTF-8\r\n");
...
@@ -44,8 +44,9 @@ header("Content-Type: text/html; charset=UTF-8\r\n");
<p>
<p>
<?php
<?php
if
(
$thisclient
&&
is_object
(
$thisclient
)
&&
$thisclient
->
isValid
())
{
if
(
$thisclient
&&
is_object
(
$thisclient
)
&&
$thisclient
->
isValid
())
{
echo
Format
::
htmlchars
(
$thisclient
->
getName
())
.
'
-
'
;
echo
Format
::
htmlchars
(
$thisclient
->
getName
())
.
'
|
'
;
?>
?>
<a
href=
"
<?php
echo
ROOT_PATH
;
?>
profile.php"
>
Profile
</a>
|
<?php
<?php
if
(
$cfg
->
showRelatedTickets
())
{
?>
if
(
$cfg
->
showRelatedTickets
())
{
?>
<a
href=
"
<?php
echo
ROOT_PATH
;
?>
tickets.php"
>
Tickets
<b>
(
<?php
echo
$thisclient
->
getNumTickets
();
?>
)
</b></a>
-
<a
href=
"
<?php
echo
ROOT_PATH
;
?>
tickets.php"
>
Tickets
<b>
(
<?php
echo
$thisclient
->
getNumTickets
();
?>
)
</b></a>
-
...
@@ -54,7 +55,7 @@ header("Content-Type: text/html; charset=UTF-8\r\n");
...
@@ -54,7 +55,7 @@ header("Content-Type: text/html; charset=UTF-8\r\n");
<a
href=
"
<?php
echo
ROOT_PATH
;
?>
logout.php?auth=
<?php
echo
$ost
->
getLinkToken
();
?>
"
>
Log Out
</a>
<a
href=
"
<?php
echo
ROOT_PATH
;
?>
logout.php?auth=
<?php
echo
$ost
->
getLinkToken
();
?>
"
>
Log Out
</a>
<?php
<?php
}
elseif
(
$nav
){
?>
}
elseif
(
$nav
){
?>
Guest User
-
<a
href=
"
<?php
echo
ROOT_PATH
;
?>
login.php"
>
Log In
</a>
Guest User
|
<a
href=
"
<?php
echo
ROOT_PATH
;
?>
login.php"
>
Log In
</a>
<?php
<?php
}
?>
}
?>
</p>
</p>
...
...
This diff is collapsed.
Click to expand it.
include/client/profile.inc.php
0 → 100644
+
25
−
0
View file @
89b28923
<?php
?>
<h1>
Manage Your Profile Information
</h1>
<p>
Use the forms below to update the information we have on file for your
account
</p>
<form
action=
"profile.php"
method=
"post"
>
<?php
csrf_token
();
?>
<table
width=
"800"
>
<?php
foreach
(
$user
->
getForms
()
as
$f
)
{
$f
->
render
(
false
);
}
?>
</table>
<hr>
<p
style=
"text-align: center;"
>
<input
type=
"submit"
value=
"Update"
/>
<input
type=
"reset"
value=
"Reset"
/>
<input
type=
"button"
value=
"Cancel"
onclick=
"javascript:
window.location.href='index.php';"
/>
</p>
</form>
This diff is collapsed.
Click to expand it.
profile.php
0 → 100644
+
35
−
0
View file @
89b28923
<?php
/*********************************************************************
profile.php
Manage client profile. This will allow a logged-in user to manage
his/her own public (non-internal) information
Peter Rotich <peter@osticket.com>
Jared Hancock <jared@osticket.com>
Copyright (c) 2006-2013 osTicket
http://www.osticket.com
Released under the GNU General Public License WITHOUT ANY WARRANTY.
See LICENSE.TXT for details.
vim: expandtab sw=4 ts=4 sts=4:
$Id: $
**********************************************************************/
require
'secure.inc.php'
;
require_once
'class.user.php'
;
$user
=
User
::
lookup
(
$thisclient
->
getId
());
if
(
$user
&&
$_POST
)
{
$errors
=
array
();
if
(
$user
->
updateInfo
(
$_POST
,
$errors
))
Http
::
redirect
(
'tickets.php'
);
}
$inc
=
'profile.inc.php'
;
include
(
CLIENTINC_DIR
.
'header.inc.php'
);
include
(
CLIENTINC_DIR
.
$inc
);
include
(
CLIENTINC_DIR
.
'footer.inc.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