summaryrefslogtreecommitdiff
path: root/profile.php
diff options
context:
space:
mode:
authormensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-12-05 07:25:04 +0000
committermensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-12-05 07:25:04 +0000
commitd6889066c0d285bf59e89b484800443304585b68 (patch)
tree8cc9aa5011a6e6a66061995a6f8186653be9695e /profile.php
parentf7ccbde31062488cbf04b3e4c06a9aa590ebfedd (diff)
downloadsemanticscuttle-d6889066c0d285bf59e89b484800443304585b68.tar.gz
semanticscuttle-d6889066c0d285bf59e89b484800443304585b68.tar.bz2
Major Refactoring: finish transforming into object . Put and into header.inc.php.
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@199 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'profile.php')
-rw-r--r--profile.php15
1 files changed, 4 insertions, 11 deletions
diff --git a/profile.php b/profile.php
index df5ae7e..56d6515 100644
--- a/profile.php
+++ b/profile.php
@@ -22,8 +22,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
require_once('header.inc.php');
/* Service creation: only useful services are created */
-$templateservice =& ServiceFactory::getServiceInstance('TemplateService');
-$userservice =& ServiceFactory::getServiceInstance('UserService');
+// No specific services
/* Managing all possible inputs */
isset($_POST['submitted']) ? define('POST_SUBMITTED', $_POST['submitted']): define('POST_SUBMITTED', '');
@@ -39,12 +38,6 @@ isset($_SESSION['token']) ? define('SESSION_TOKEN', $_SESSION['token']): define(
isset($_SESSION['token_stamp']) ? define('SESSION_TOKENSTAMP', $_SESSION['token_stamp']): define('SESSION_TOKENSTAMP', '');
-/* Managing current logged user */
-$currentObjectUser = $userservice->getCurrentObjectUser();
-
-
-$tplVars = array();
-
@list($url, $user) = isset($_SERVER['PATH_INFO']) ? explode('/', $_SERVER['PATH_INFO']) : NULL;
if ($user) {
@@ -67,7 +60,7 @@ if ($user) {
exit();
}
-if ($userservice->isLoggedOn() && $user == $currentObjectUser->getUsername()) {
+if ($userservice->isLoggedOn() && $user == $currentUser->getUsername()) {
$title = T_('My Profile');
} else {
$title = T_('Profile') .': '. $user;
@@ -78,7 +71,7 @@ $tplVars['subtitle'] = $title;
$tplVars['user'] = $user;
$tplVars['userid'] = $userid;
-if (POST_SUBMITTED!='' && $currentObjectUser->getId() == $userid) {
+if (POST_SUBMITTED!='' && $currentUser->getId() == $userid) {
$error = false;
$detPass = trim(POST_PASS);
$detPassConf = trim(POST_PASSCONF);
@@ -117,7 +110,7 @@ if (POST_SUBMITTED!='' && $currentObjectUser->getId() == $userid) {
$userinfo = $userservice->getObjectUserByUsername($user);
}
-if (!$userservice->isLoggedOn() || $currentObjectUser->getId() != $userid) {
+if (!$userservice->isLoggedOn() || $currentUser->getId() != $userid) {
$templatename = 'profile.tpl.php';
} else {
//Token Init