diff options
author | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-07-06 15:22:19 +0000 |
---|---|---|
committer | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-07-06 15:22:19 +0000 |
commit | 9c39d755096d01c9653a74a383a796c19c75ddb7 (patch) | |
tree | cc8fe77a33163f8f458ac2efab1f95b2c7a22e95 /mod | |
parent | 1a5f51b1fcd6687735f096870a8547b125a43e06 (diff) | |
download | elgg-9c39d755096d01c9653a74a383a796c19c75ddb7.tar.gz elgg-9c39d755096d01c9653a74a383a796c19c75ddb7.tar.bz2 |
Admin cropping of other user icons now works as expected.
git-svn-id: https://code.elgg.org/elgg/trunk@3391 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod')
-rw-r--r-- | mod/profile/actions/cropicon.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/mod/profile/actions/cropicon.php b/mod/profile/actions/cropicon.php index 58f12a512..9e60ffec4 100644 --- a/mod/profile/actions/cropicon.php +++ b/mod/profile/actions/cropicon.php @@ -35,20 +35,20 @@ && $tiny !== false) {
$filehandler = new ElggFile();
- $filehandler->owner_guid = $_SESSION['user']->getGUID();
- $filehandler->setFilename("profile/" . $_SESSION['user']->username . "medium.jpg");
+ $filehandler->owner_guid = $user->getGUID();
+ $filehandler->setFilename("profile/" . $user->username . "medium.jpg");
$filehandler->open("write");
$filehandler->write($medium);
$filehandler->close();
- $filehandler->setFilename("profile/" . $_SESSION['user']->username . "small.jpg");
+ $filehandler->setFilename("profile/" . $user->username . "small.jpg");
$filehandler->open("write");
$filehandler->write($small);
$filehandler->close();
- $filehandler->setFilename("profile/" . $_SESSION['user']->username . "tiny.jpg");
+ $filehandler->setFilename("profile/" . $user->username . "tiny.jpg");
$filehandler->open("write");
$filehandler->write($tiny);
$filehandler->close();
- $filehandler->setFilename("profile/" . $_SESSION['user']->username . "topbar.jpg");
+ $filehandler->setFilename("profile/" . $user->username . "topbar.jpg");
$filehandler->open("write");
$filehandler->write($topbar);
$filehandler->close();
@@ -58,7 +58,7 @@ $user->y1 = $y1;
$user->y2 = $y2;
- $_SESSION['user']->icontime = time();
+ $user->icontime = time();
system_message(elgg_echo("profile:icon:uploaded"));
@@ -68,7 +68,7 @@ //forward the user back to the upload page to crop
- $url = $vars['url'] . "mod/profile/editicon.php";
+ $url = $vars['url'] . "pg/profile/{$user->username}/editicon/";
if (isloggedin()) forward($url);
|