aboutsummaryrefslogtreecommitdiff
path: root/mod/bookmarks/actions
diff options
context:
space:
mode:
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-10-30 21:32:54 +0000
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-10-30 21:32:54 +0000
commitf49fdf4e1c80fe5bde922c25bdd6ca0e2c912ddb (patch)
treeeb2fdb272ba76e83af60378d05602a26a265be36 /mod/bookmarks/actions
parent9ebb6cff1cf22d4fb708c4ced37604c6cf5bbfae (diff)
downloadelgg-f49fdf4e1c80fe5bde922c25bdd6ca0e2c912ddb.tar.gz
elgg-f49fdf4e1c80fe5bde922c25bdd6ca0e2c912ddb.tar.bz2
Refs #2124: Using get_loggedin_user functions instead of $vars['user'], $_SESSION['user'], etc.
git-svn-id: http://code.elgg.org/elgg/trunk@7139 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/bookmarks/actions')
-rw-r--r--mod/bookmarks/actions/add.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/mod/bookmarks/actions/add.php b/mod/bookmarks/actions/add.php
index 5b0ce91c4..e633244c1 100644
--- a/mod/bookmarks/actions/add.php
+++ b/mod/bookmarks/actions/add.php
@@ -23,8 +23,8 @@ if (!$title || !$address) {
//create a new bookmark object
$entity = new ElggObject;
$entity->subtype = "bookmarks";
-$entity->owner_guid = get_loggedin_user()->getGUID();
-$entity->container_guid = (int)get_input('container_guid', get_loggedin_user()->getGUID());
+$entity->owner_guid = get_loggedin_userid();
+$entity->container_guid = (int)get_input('container_guid', get_loggedin_userid());
$entity->title = $title;
$entity->description = $notes;
$entity->address = $address;
@@ -35,9 +35,9 @@ $entity->tags = $tagarray;
if ($entity->save()) {
system_message(elgg_echo('bookmarks:save:success'));
//add to river
- add_to_river('river/object/bookmarks/create','create',$_SESSION['user']->guid,$entity->guid);
+ add_to_river('river/object/bookmarks/create','create',get_loggedin_userid(),$entity->guid);
} else {
register_error(elgg_echo('bookmarks:save:failed'));
}
-$account = get_entity((int)get_input('container_guid', get_loggedin_user()->getGUID()));
+$account = get_entity((int)get_input('container_guid', get_loggedin_userid()));
forward("pg/bookmarks/" . $account->username); \ No newline at end of file