aboutsummaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
Diffstat (limited to 'actions')
-rw-r--r--actions/admin/site/update_basic.php1
-rw-r--r--actions/login.php1
-rw-r--r--actions/profile/edit.php7
-rw-r--r--actions/user/requestnewpassword.php5
-rw-r--r--actions/useradd.php2
5 files changed, 8 insertions, 8 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/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();
}