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/groups/actions/forums/addtopic.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'mod/groups/actions/forums/addtopic.php') diff --git a/mod/groups/actions/forums/addtopic.php b/mod/groups/actions/forums/addtopic.php index a0b9acc10..5f9c8e709 100644 --- a/mod/groups/actions/forums/addtopic.php +++ b/mod/groups/actions/forums/addtopic.php @@ -11,7 +11,7 @@ // Check the user is a group member $group_entity = get_entity(get_input('group_guid')); - if (!$group_entity->isMember($vars['user'])) forward(); + if (!$group_entity->isMember(get_loggedin_user())) forward(); // Get input data $title = strip_tags(get_input('topictitle')); @@ -19,7 +19,7 @@ $tags = get_input('topictags'); $access = get_input('access_id'); $group_guid = (int) get_input('group_guid'); - $user = $_SESSION['user']->getGUID(); // you need to be logged in to comment on a group forum + $user = get_loggedin_userid(); // you need to be logged in to comment on a group forum $status = get_input('status'); // sticky, resolved, closed // Convert string of tags into a preformatted array @@ -60,7 +60,7 @@ $grouptopic->status = $status; // the current status i.e sticky, closed, resolved, open // add to river - add_to_river('river/forum/topic/create','create',$_SESSION['user']->guid,$grouptopic->guid); + add_to_river('river/forum/topic/create','create',get_loggedin_userid(),$grouptopic->guid); // Success message system_message(elgg_echo("grouptopic:created")); -- cgit v1.2.3