diff options
Diffstat (limited to 'mod/profile/actions')
| -rw-r--r-- | mod/profile/actions/edit.php | 46 | ||||
| -rw-r--r-- | mod/profile/actions/iconupload.php | 62 |
2 files changed, 0 insertions, 108 deletions
diff --git a/mod/profile/actions/edit.php b/mod/profile/actions/edit.php deleted file mode 100644 index 7ace0a22b..000000000 --- a/mod/profile/actions/edit.php +++ /dev/null @@ -1,46 +0,0 @@ -<?php
-
- /**
- * Elgg profile plugin edit action
- *
- * @package ElggProfile
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Ben Werdmuller <ben@curverider.co.uk>
- * @copyright Curverider Ltd 2008
- * @link http://elgg.com/
- */
-
- // Load configuration
- global $CONFIG;
-
- // Get profile fields
- $input = array();
- foreach($CONFIG->profile as $shortname => $valuetype) {
- $input[$shortname] = get_input($shortname);
- if ($valuetype == 'tags')
- $input[$shortname] = string_to_tag_array($input[$shortname]);
- }
-
- // Save stuff if we can, and forward to the user's profile
- $user = $_SESSION['user'];
- if ($user->canEdit()) {
-
- // Save stuff
- if (sizeof($input) > 0)
- foreach($input as $shortname => $value) {
- $user->$shortname = $value;
- }
- $user->save();
-
- system_message(elgg_echo("profile:saved"));
-
- // Forward to the user's profile
- forward($user->getUrl());
-
- } else {
- // If we can't, display an error
-
- system_message(elgg_echo("profile:cantedit"));
- }
-
-?>
\ No newline at end of file diff --git a/mod/profile/actions/iconupload.php b/mod/profile/actions/iconupload.php deleted file mode 100644 index 7c7e95f37..000000000 --- a/mod/profile/actions/iconupload.php +++ /dev/null @@ -1,62 +0,0 @@ -<?php
-
- /**
- * Elgg profile plugin upload new user icon action
- *
- * @package ElggProfile
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Ben Werdmuller <ben@curverider.co.uk>
- * @copyright Curverider Ltd 2008
- * @link http://elgg.com/
- */
-
- // If we were given a correct icon
- if (
- isloggedin()
- ) {
-
- $tiny = get_resized_image_from_uploaded_file('profileicon',25,25);
- $small = get_resized_image_from_uploaded_file('profileicon',50,50);
- $medium = get_resized_image_from_uploaded_file('profileicon',100,100);
- $large = get_resized_image_from_uploaded_file('profileicon',300,300);
-
- if ($small !== false
- && $medium !== false
- && $large !== false) {
-
- $filehandler = new ElggFile();
- $filehandler->owner_guid = $_SESSION['user']->getGUID();
- $filehandler->setFilename("profile/" . $_SESSION['user']->username . "large.jpg");
- $filehandler->open("write");
- $filehandler->write($large);
- $filehandler->close();
- $filehandler->setFilename("profile/" . $_SESSION['user']->username . "medium.jpg");
- $filehandler->open("write");
- $filehandler->write($medium);
- $filehandler->close();
- $filehandler->setFilename("profile/" . $_SESSION['user']->username . "small.jpg");
- $filehandler->open("write");
- $filehandler->write($small);
- $filehandler->close();
- $filehandler->setFilename("profile/" . $_SESSION['user']->username . "tiny.jpg");
- $filehandler->open("write");
- $filehandler->write($small);
- $filehandler->close();
-
- $_SESSION['user']->icontime = time();
-
- system_message(elgg_echo("profile:icon:uploaded"));
-
- } else {
- system_message(elgg_echo("profile:icon:notfound"));
- }
-
- } else {
-
- system_message(elgg_echo("profile:icon:notfound"));
-
- }
-
- if (isloggedin()) forward($_SESSION['user']->getURL());
-
-?>
\ No newline at end of file |
