From f49fdf4e1c80fe5bde922c25bdd6ca0e2c912ddb Mon Sep 17 00:00:00 2001 From: ewinslow Date: Sat, 30 Oct 2010 21:32:54 +0000 Subject: 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 --- mod/bookmarks/actions/add.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'mod/bookmarks/actions/add.php') 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 -- cgit v1.2.3