aboutsummaryrefslogtreecommitdiff
path: root/mod/profile/views
diff options
context:
space:
mode:
Diffstat (limited to 'mod/profile/views')
-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
3 files changed, 9 insertions, 9 deletions
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>";