Skip to content
Snippets Groups Projects
Commit 89b28923 authored by Jared Hancock's avatar Jared Hancock
Browse files

Add profile management page

parent aa0ed190
Branches
Tags
No related merge requests found
...@@ -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()).'&nbsp;-&nbsp;'; echo Format::htmlchars($thisclient->getName()).'&nbsp;|';
?> ?>
<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>
......
<?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>
<?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');
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment