aboutsummaryrefslogtreecommitdiff
path: root/mod/profile
diff options
context:
space:
mode:
Diffstat (limited to 'mod/profile')
-rw-r--r--mod/profile/actions/addcomment.php14
-rw-r--r--mod/profile/actions/edit.php2
-rw-r--r--mod/profile/start.php2
-rw-r--r--mod/profile/views/default/profile/editicon.php12
-rw-r--r--mod/profile/views/default/profile/icon.php4
-rwxr-xr-xmod/profile/views/default/profile/profile_ownerblock.php2
6 files changed, 18 insertions, 18 deletions
diff --git a/mod/profile/actions/addcomment.php b/mod/profile/actions/addcomment.php
index 5850efe25..0e241db0a 100644
--- a/mod/profile/actions/addcomment.php
+++ b/mod/profile/actions/addcomment.php
@@ -16,25 +16,25 @@ $user = get_entity($page_owner); // the commentwall owner details
if ($user && !empty($message_content)) {
// If posting the comment was successful, say so
- if ($user->annotate('commentwall',$message_content,$user->access_id, $_SESSION['user']->getGUID())) {
+ if ($user->annotate('commentwall',$message_content,$user->access_id, get_loggedin_userid())) {
global $CONFIG;
- if ($user->getGUID() != $_SESSION['user']->getGUID())
- notify_user($user->getGUID(), $_SESSION['user']->getGUID(), elgg_echo('profile:comment:subject'),
+ if ($user->getGUID() != get_loggedin_userid())
+ notify_user($user->getGUID(), get_loggedin_userid(), elgg_echo('profile:comment:subject'),
sprintf(
elgg_echo('profile:comment:body'),
- $_SESSION['user']->name,
+ get_loggedin_user()->name,
$message_content,
$CONFIG->wwwroot . "pg/profile/" . $user->username,
- $_SESSION['user']->name,
- $_SESSION['user']->getURL()
+ get_loggedin_user()->name,
+ get_loggedin_user()->getURL()
)
);
system_message(elgg_echo("profile:commentwall:posted"));
// add to river
- add_to_river('river/object/profile/commentwall/create','commentwall',$_SESSION['user']->guid,$user->guid);
+ add_to_river('river/object/profile/commentwall/create','commentwall',get_loggedin_userid(),$user->guid);
} else {
register_error(elgg_echo("profile:commentwall:failure"));
diff --git a/mod/profile/actions/edit.php b/mod/profile/actions/edit.php
index c21a43fbf..b9cc8e19d 100644
--- a/mod/profile/actions/edit.php
+++ b/mod/profile/actions/edit.php
@@ -102,7 +102,7 @@ if (sizeof($input) > 0) {
//add to river if edited by self
if (get_loggedin_userid() == $user->guid) {
- add_to_river('river/user/default/profileupdate','update',$_SESSION['user']->guid,$_SESSION['user']->guid,get_default_access($_SESSION['user']));
+ add_to_river('river/user/default/profileupdate','update',get_loggedin_userid(),get_loggedin_userid(),get_default_access(get_loggedin_user()));
}
system_message(elgg_echo("profile:saved"));
diff --git a/mod/profile/start.php b/mod/profile/start.php
index 1d73b6632..48547c0bf 100644
--- a/mod/profile/start.php
+++ b/mod/profile/start.php
@@ -21,7 +21,7 @@ function profile_init() {
// Set up the menu for logged-in users
elgg_extend_view('elgg_topbar/extend', 'profile/topbar_extend');
//if (isloggedin()) {
- // add_menu(elgg_echo('profile:yours'), $_SESSION['user']->getURL() . '/extend');
+ // add_menu(elgg_echo('profile:yours'), get_loggedin_user()->getURL() . '/extend');
//}
// Metadata on users needs to be independent
diff --git a/mod/profile/views/default/profile/editicon.php b/mod/profile/views/default/profile/editicon.php
index 316c42d20..53de19c59 100644
--- a/mod/profile/views/default/profile/editicon.php
+++ b/mod/profile/views/default/profile/editicon.php
@@ -9,7 +9,7 @@
*/
// user is passed to view and set by caller (normally the page editicon)
-$currentuser = $vars['user'];
+$currentuser = get_loggedin_user();
?>
<div id="edit_profile_avatar">
<!-- grab the required js for icon cropping -->
@@ -129,11 +129,11 @@ $currentuser = $vars['user'];
<form action="<?php echo $vars['url']; ?>action/profile/cropicon" method="post" />
<?php echo elgg_view('input/securitytoken'); ?>
- <input type="hidden" name="username" value="<?php echo $vars['user']->username; ?>" />
- <input type="hidden" name="x_1" value="<?php echo $vars['user']->x1; ?>" id="x_1" />
- <input type="hidden" name="x_2" value="<?php echo $vars['user']->x2; ?>" id="x_2" />
- <input type="hidden" name="y_1" value="<?php echo $vars['user']->y1; ?>" id="y_1" />
- <input type="hidden" name="y_2" value="<?php echo $vars['user']->y2; ?>" id="y_2" />
+ <input type="hidden" name="username" value="<?php echo get_loggedin_user()->username; ?>" />
+ <input type="hidden" name="x_1" value="<?php echo get_loggedin_user()->x1; ?>" id="x_1" />
+ <input type="hidden" name="x_2" value="<?php echo get_loggedin_user()->x2; ?>" id="x_2" />
+ <input type="hidden" name="y_1" value="<?php echo get_loggedin_user()->y1; ?>" id="y_1" />
+ <input type="hidden" name="y_2" value="<?php echo get_loggedin_user()->y2; ?>" id="y_2" />
<input type="submit" name="submit" value="<?php echo elgg_echo("profile:createicon"); ?>" />
</form>
diff --git a/mod/profile/views/default/profile/icon.php b/mod/profile/views/default/profile/icon.php
index 14017d618..1423070d4 100644
--- a/mod/profile/views/default/profile/icon.php
+++ b/mod/profile/views/default/profile/icon.php
@@ -11,7 +11,7 @@
// Get entity
if (empty($vars['entity'])) {
- $vars['entity'] = $vars['user'];
+ $vars['entity'] = get_loggedin_user();
}
if ($vars['entity'] instanceof ElggUser) {
@@ -54,7 +54,7 @@ if ($vars['entity'] instanceof ElggUser) {
echo "<ul class='sub_menu_list'>";
if (isloggedin()) {
// if not looking at your own avatar menu
- if ($vars['entity']->getGUID() != $vars['user']->getGUID()) {
+ if ($vars['entity']->getGUID() != get_loggedin_userid()) {
// Add / Remove friend link
$friendlinks = elgg_view('profile/menu/friendlinks',$vars);
diff --git a/mod/profile/views/default/profile/profile_ownerblock.php b/mod/profile/views/default/profile/profile_ownerblock.php
index 3837bd3f2..58386fc04 100755
--- a/mod/profile/views/default/profile/profile_ownerblock.php
+++ b/mod/profile/views/default/profile/profile_ownerblock.php
@@ -36,7 +36,7 @@ if ($section == 'details') {
$more_info .= "</div>";
}
$profile_actions = "";
-if (isloggedin() && (get_loggedin_user()->getGuid() == page_owner())) {
+if (isloggedin() && (get_loggedin_userid() == page_owner())) {
$profile_actions = "<div class='clearfloat profile_actions'>";
$profile_actions .= "<a href='{$vars['url']}pg/profile/{$user->username}/edit/details' class='action_button'>". elgg_echo('profile:edit') ."</a>";
$profile_actions .= "<a href='{$vars['url']}pg/profile/{$user->username}/edit/icon' class='action_button'>". elgg_echo('profile:editicon') ."</a>";