aboutsummaryrefslogtreecommitdiff
path: root/mod/riverdashboard
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/riverdashboard
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/riverdashboard')
-rw-r--r--mod/riverdashboard/actions/add.php4
-rw-r--r--mod/riverdashboard/index.php4
-rw-r--r--mod/riverdashboard/views/default/riverdashboard/ecml/activity.php2
-rw-r--r--mod/riverdashboard/views/default/riverdashboard/welcome.php2
4 files changed, 6 insertions, 6 deletions
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 @@
*/
?>
-<h2><?php echo sprintf(elgg_echo('welcome:user'), $_SESSION['user']->name); ?></h2> \ No newline at end of file
+<h2><?php echo sprintf(elgg_echo('welcome:user'), get_loggedin_user()->name); ?></h2> \ No newline at end of file