summaryrefslogtreecommitdiff
path: root/services/userservice.php
diff options
context:
space:
mode:
authormensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-04-18 09:57:32 +0000
committermensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-04-18 09:57:32 +0000
commit74fb49098eb52b8f42110713caa3892572305cf3 (patch)
tree88c45fd70c571df74e26210c19a2ae3d4ce529d1 /services/userservice.php
parent09cbb64c829e8e4a413a90cb5a753c27b901a050 (diff)
downloadsemanticscuttle-74fb49098eb52b8f42110713caa3892572305cf3.tar.gz
semanticscuttle-74fb49098eb52b8f42110713caa3892572305cf3.tar.bz2
Bug fix: correct problem with mutual logins for several installations on the same host
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@114 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'services/userservice.php')
-rw-r--r--services/userservice.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/services/userservice.php b/services/userservice.php
index c691b36..9e3adca 100644
--- a/services/userservice.php
+++ b/services/userservice.php
@@ -23,8 +23,8 @@ class UserService {
function UserService(& $db) {
$this->db =& $db;
$this->tablename = $GLOBALS['tableprefix'] .'users';
- $this->sessionkey = $GLOBALS['cookieprefix'] .'-currentuserid';
- $this->cookiekey = $GLOBALS['cookieprefix'] .'-login';
+ $this->sessionkey = $GLOBALS['cookieprefix'].INSTALLATION_ID.'-currentuserid';
+ $this->cookiekey = $GLOBALS['cookieprefix'].INSTALLATION_ID.'-login';
$this->profileurl = createURL('profile', '%2$s');
}
@@ -145,8 +145,11 @@ class UserService {
function getCurrentUserId() {
if (isset($_SESSION[$this->getSessionKey()])) {
+//echo "session";die($_SESSION[$this->getSessionKey()]);
return $_SESSION[$this->getSessionKey()];
} else if (isset($_COOKIE[$this->getCookieKey()])) {
+//echo "cookie";die();
+
$cook = split(':', $_COOKIE[$this->getCookieKey()]);
//cookie looks like this: 'id:md5(username+password)'
$query = 'SELECT * FROM '. $this->getTableName() .