Update of /cvsroot/upcase-project/UpCase/admin
In directory usw-pr-cvs1:/tmp/cvs-serv15426
Added Files:
myaccount.php
Log Message:
user's account edition form
--- NEW FILE: myaccount.php ---
<?php
include_once("../config/uc_config.inc");
include_once("lib/uc_page.php");
$page = new UcPage("myAccount");
$page->open();
$user = $page->session->getUser();
if ($user->uid == -1)
{
header("Location: " . $uc_info["notLoggedIn"]);
exit();
}
if ($page->session->checkPassword($user->name, $curpwd))
{
if (!empty($firstname))
$user->setFirstName($firstname);
if (!empty($lastname))
$user->setLastName($lastname);
if (!empty($email))
$user->setEmail($email);
if (!empty($newpwd) && !empty($confirm))
{
if ($newpwd == $confirm)
$user->setPassword($newpwd);
else
die("Passwords mismatch");
}
}
include("config/uc_templates.inc");
$tmpl = new ModeliXe($uc_tmpl["MY_ACCOUNT"]);
$tmpl->SetModeliXe();
$tmpl->MxText("firstname", $user->firstName);
$tmpl->MxText("lastname", $user->lastName);
$tmpl->MxText("email", $user->email);
$tmpl->MxWrite();
?>
|