summaryrefslogtreecommitdiff
path: root/src/SemanticScuttle/Service
diff options
context:
space:
mode:
authorcweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>2010-02-20 11:35:16 +0000
committercweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>2010-02-20 11:35:16 +0000
commitcae9f4de38376974b805dab6b7a95105dc61dfd9 (patch)
treec87bd0768ad223c5cb543b5d60b76e07de8ba197 /src/SemanticScuttle/Service
parent41a29f49ee4446b1e743356a837a96ca29118f78 (diff)
downloadsemanticscuttle-cae9f4de38376974b805dab6b7a95105dc61dfd9.tar.gz
semanticscuttle-cae9f4de38376974b805dab6b7a95105dc61dfd9.tar.bz2
fix tests after last commit
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@678 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'src/SemanticScuttle/Service')
-rw-r--r--src/SemanticScuttle/Service/Bookmark.php5
-rw-r--r--src/SemanticScuttle/Service/User.php1
2 files changed, 5 insertions, 1 deletions
diff --git a/src/SemanticScuttle/Service/Bookmark.php b/src/SemanticScuttle/Service/Bookmark.php
index 37a6a5e..87d9e02 100644
--- a/src/SemanticScuttle/Service/Bookmark.php
+++ b/src/SemanticScuttle/Service/Bookmark.php
@@ -285,10 +285,13 @@ class SemanticScuttle_Service_Bookmark extends SemanticScuttle_DbService
$userservice = SemanticScuttle_Service_Factory::get('User');
$user = $userservice->getCurrentObjectUser();
+ if ($user === null) {
+ return false;
+ }
//user has to be either admin, or owner
if ($GLOBALS['adminsCanModifyBookmarksFromOtherUsers']
- && $userservice->isAdmin($user)
+ && $userservice->isAdmin($user->id)
) {
return true;
} else {
diff --git a/src/SemanticScuttle/Service/User.php b/src/SemanticScuttle/Service/User.php
index 7b03dd2..281c18c 100644
--- a/src/SemanticScuttle/Service/User.php
+++ b/src/SemanticScuttle/Service/User.php
@@ -407,6 +407,7 @@ class SemanticScuttle_Service_User extends SemanticScuttle_DbService
}
//reload user object
$this->getCurrentUser(true);
+ $this->getCurrentObjectUser(true);
}