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/riverdashboard/actions/add.php | 4 ++-- mod/riverdashboard/index.php | 4 ++-- mod/riverdashboard/views/default/riverdashboard/ecml/activity.php | 2 +- mod/riverdashboard/views/default/riverdashboard/welcome.php | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) (limited to 'mod/riverdashboard') diff --git a/mod/riverdashboard/actions/add.php b/mod/riverdashboard/actions/add.php index 22fdd7377..8e19db636 100644 --- a/mod/riverdashboard/actions/add.php +++ b/mod/riverdashboard/actions/add.php @@ -26,7 +26,7 @@ if (empty($message)) { // Tell the system it's a site wide message $sitemessage->subtype = "sitemessage"; // Set its owner to the current user - $sitemessage->owner_guid = $_SESSION['user']->getGUID(); + $sitemessage->owner_guid = get_loggedin_userid(); // For now, set its access to logged in users $sitemessage->access_id = 1; // this is for all logged in users // Set description appropriately @@ -41,7 +41,7 @@ if (empty($message)) { system_message(elgg_echo("sitemessages:posted")); // add to river - add_to_river('river/sitemessage/create','create',$_SESSION['user']->guid,$sitemessage->guid); + add_to_river('river/sitemessage/create','create',get_loggedin_userid(),$sitemessage->guid); // Forward to the activity page forward("mod/riverdashboard/"); diff --git a/mod/riverdashboard/index.php b/mod/riverdashboard/index.php index c4a567a8d..e0aa21b1b 100644 --- a/mod/riverdashboard/index.php +++ b/mod/riverdashboard/index.php @@ -23,12 +23,12 @@ $body = ''; switch($orient) { case 'mine': - $subject_guid = $_SESSION['user']->guid; + $subject_guid = get_loggedin_userid(); $relationship_type = ''; $title_wording = elgg_echo('river:mine'); break; case 'friends': - $subject_guid = $_SESSION['user']->guid; + $subject_guid = get_loggedin_userid(); $relationship_type = 'friend'; $title_wording = elgg_echo('river:friends'); break; diff --git a/mod/riverdashboard/views/default/riverdashboard/ecml/activity.php b/mod/riverdashboard/views/default/riverdashboard/ecml/activity.php index cfec67c7d..d24a8ffc2 100644 --- a/mod/riverdashboard/views/default/riverdashboard/ecml/activity.php +++ b/mod/riverdashboard/views/default/riverdashboard/ecml/activity.php @@ -5,7 +5,7 @@ * @package ECML */ -// $vars['user'] is apparently the loggedin user. +// get_loggedin_user() is apparently the loggedin user. $owner = (isset($vars['owner'])) ? $vars['owner'] : NULL; $type = (isset($vars['type'])) ? $vars['type'] : NULL; $subtype = (isset($vars['subtype'])) ? $vars['subtype'] : NULL; diff --git a/mod/riverdashboard/views/default/riverdashboard/welcome.php b/mod/riverdashboard/views/default/riverdashboard/welcome.php index 394e84f7b..3c9778eda 100644 --- a/mod/riverdashboard/views/default/riverdashboard/welcome.php +++ b/mod/riverdashboard/views/default/riverdashboard/welcome.php @@ -5,4 +5,4 @@ */ ?> -

name); ?>

\ No newline at end of file +

name); ?>

\ No newline at end of file -- cgit v1.2.3