aboutsummaryrefslogtreecommitdiff
path: root/mod/groups/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/groups/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/groups/actions')
-rw-r--r--mod/groups/actions/delete.php2
-rw-r--r--mod/groups/actions/forums/addtopic.php6
-rw-r--r--mod/groups/actions/forums/edittopic.php2
-rw-r--r--mod/groups/actions/leave.php2
4 files changed, 6 insertions, 6 deletions
diff --git a/mod/groups/actions/delete.php b/mod/groups/actions/delete.php
index b4bc71838..7d66b2a25 100644
--- a/mod/groups/actions/delete.php
+++ b/mod/groups/actions/delete.php
@@ -14,6 +14,6 @@
else
register_error(elgg_echo('group:notdeleted'));
- $url_name = $_SESSION['user']->username;
+ $url_name = get_loggedin_user()->username;
forward("{$vars['url']}pg/groups/member/{$url_name}");
?> \ No newline at end of file
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"));
diff --git a/mod/groups/actions/forums/edittopic.php b/mod/groups/actions/forums/edittopic.php
index c7da084da..59c46af73 100644
--- a/mod/groups/actions/forums/edittopic.php
+++ b/mod/groups/actions/forums/edittopic.php
@@ -8,7 +8,7 @@ if (!isloggedin()) forward();
// 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'));
diff --git a/mod/groups/actions/leave.php b/mod/groups/actions/leave.php
index 721bff2c8..58f2655ad 100644
--- a/mod/groups/actions/leave.php
+++ b/mod/groups/actions/leave.php
@@ -14,7 +14,7 @@
$group_guid = get_input('group_guid');
$user = NULL;
- if (!$user_guid) $user = $_SESSION['user'];
+ if (!$user_guid) $user = get_loggedin_user();
else
$user = get_entity($user_guid);