diff options
Diffstat (limited to 'actions')
-rw-r--r-- | actions/admin/site/update_basic.php | 1 | ||||
-rw-r--r-- | actions/avatar/crop.php | 1 | ||||
-rw-r--r-- | actions/avatar/upload.php | 16 | ||||
-rw-r--r-- | actions/login.php | 1 | ||||
-rw-r--r-- | actions/profile/edit.php | 7 | ||||
-rw-r--r-- | actions/user/requestnewpassword.php | 5 | ||||
-rw-r--r-- | actions/useradd.php | 2 |
7 files changed, 16 insertions, 17 deletions
diff --git a/actions/admin/site/update_basic.php b/actions/admin/site/update_basic.php index c809dc671..45f00a20d 100644 --- a/actions/admin/site/update_basic.php +++ b/actions/admin/site/update_basic.php @@ -24,4 +24,5 @@ if (datalist_get('default_site')) { set_config('language', get_input('language'), $site->getGUID()); } +system_message(elgg_echo('admin:configuration:success')); forward(REFERER);
\ No newline at end of file diff --git a/actions/avatar/crop.php b/actions/avatar/crop.php index 39061fa2c..6d71b6f06 100644 --- a/actions/avatar/crop.php +++ b/actions/avatar/crop.php @@ -23,6 +23,7 @@ $filehandler->setFilename("profile/" . $owner->guid . "master" . ".jpg"); $filename = $filehandler->getFilenameOnFilestore(); $icon_sizes = elgg_get_config('icon_sizes'); +unset($icon_sizes['master']); // get the images and save their file handlers into an array // so we can do clean up if one fails. diff --git a/actions/avatar/upload.php b/actions/avatar/upload.php index 885a16557..0752615e0 100644 --- a/actions/avatar/upload.php +++ b/actions/avatar/upload.php @@ -16,15 +16,7 @@ if ($_FILES['avatar']['error'] != 0) { forward(REFERER); } -//@todo make this configurable? -$icon_sizes = array( - 'topbar' => array('w'=>16, 'h'=>16, 'square'=>TRUE, 'upscale'=>TRUE), - 'tiny' => array('w'=>25, 'h'=>25, 'square'=>TRUE, 'upscale'=>TRUE), - 'small' => array('w'=>40, 'h'=>40, 'square'=>TRUE, 'upscale'=>TRUE), - 'medium' => array('w'=>100, 'h'=>100, 'square'=>TRUE, 'upscale'=>TRUE), - 'large' => array('w'=>200, 'h'=>200, 'square'=>FALSE, 'upscale'=>TRUE), - 'master' => array('w'=>550, 'h'=>550, 'square'=>FALSE, 'upscale'=>FALSE) -); +$icon_sizes = elgg_get_config('icon_sizes'); // get the images and save their file handlers into an array // so we can do clean up if one fails. @@ -52,6 +44,12 @@ foreach ($icon_sizes as $name => $size_info) { } } +// reset crop coordinates +$owner->x1 = 0; +$owner->x2 = 0; +$owner->y1 = 0; +$owner->y2 = 0; + $owner->icontime = time(); if (elgg_trigger_event('profileiconupdate', $owner->type, $owner)) { system_message(elgg_echo("avatar:upload:success")); diff --git a/actions/login.php b/actions/login.php index 5934d1423..c717faadd 100644 --- a/actions/login.php +++ b/actions/login.php @@ -28,7 +28,6 @@ if (empty($username) || empty($password)) { } // check if logging in with email address -// @todo Are usernames with @ not allowed? if (strpos($username, '@') !== FALSE && ($users = get_user_by_email($username))) { $username = $users[0]->username; } diff --git a/actions/profile/edit.php b/actions/profile/edit.php index e86053b07..8ca60f246 100644 --- a/actions/profile/edit.php +++ b/actions/profile/edit.php @@ -62,12 +62,7 @@ if ($name) { register_error(elgg_echo('user:name:fail')); } elseif ($owner->name != $name) { $owner->name = $name; - // @todo this is weird...giving two notifications? - if ($owner->save()) { - system_message(elgg_echo('user:name:success')); - } else { - register_error(elgg_echo('user:name:fail')); - } + $owner->save(); } } diff --git a/actions/user/requestnewpassword.php b/actions/user/requestnewpassword.php index 5dfa24952..f1d4fa43c 100644 --- a/actions/user/requestnewpassword.php +++ b/actions/user/requestnewpassword.php @@ -8,6 +8,11 @@ $username = get_input('username'); +// allow email addresses +if (strpos($username, '@') !== false && ($users = get_user_by_email($username))) { + $username = $users[0]->username; +} + $user = get_user_by_username($username); if ($user) { if (send_new_password_request($user->guid)) { diff --git a/actions/useradd.php b/actions/useradd.php index 3df41af79..fdcd7e438 100644 --- a/actions/useradd.php +++ b/actions/useradd.php @@ -37,7 +37,7 @@ try { if ($guid) { $new_user = get_entity($guid); - if ($uew_user && $admin && elgg_is_admin_logged_in()) { + if ($new_user && $admin && elgg_is_admin_logged_in()) { $new_user->makeAdmin(); } |