diff options
author | ewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-10-30 21:32:54 +0000 |
---|---|---|
committer | ewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-10-30 21:32:54 +0000 |
commit | f49fdf4e1c80fe5bde922c25bdd6ca0e2c912ddb (patch) | |
tree | eb2fdb272ba76e83af60378d05602a26a265be36 /mod/profile/views | |
parent | 9ebb6cff1cf22d4fb708c4ced37604c6cf5bbfae (diff) | |
download | elgg-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/profile/views')
-rw-r--r-- | mod/profile/views/default/profile/editicon.php | 12 | ||||
-rw-r--r-- | mod/profile/views/default/profile/icon.php | 4 | ||||
-rwxr-xr-x | mod/profile/views/default/profile/profile_ownerblock.php | 2 |
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>"; |