aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--actions/useradd.php6
-rw-r--r--languages/en.php21
2 files changed, 25 insertions, 2 deletions
diff --git a/actions/useradd.php b/actions/useradd.php
index d2a243336..e6e071f01 100644
--- a/actions/useradd.php
+++ b/actions/useradd.php
@@ -16,7 +16,8 @@
admin_gatekeeper(); // Only admins can make someone an admin
action_gatekeeper();
- // Get variables
+ // Get variables
+ global $CONFIG;
$username = get_input('username');
$password = get_input('password');
$password2 = get_input('password2');
@@ -40,6 +41,9 @@
$new_user->admin = 'yes';
$new_user->admin_created = true;
+
+
+ notify_user($new_user->guid, $CONFIG->site->guid, elgg_echo('useradd:subject'), sprintf(elgg_echo('useradd:body'), $name, $CONFIG->site->name, $CONFIG->site->url, $username, $password));
system_message(sprintf(elgg_echo("adduser:ok"),$CONFIG->sitename));
} else {
diff --git a/languages/en.php b/languages/en.php
index ddf3c443d..4163b9d4c 100644
--- a/languages/en.php
+++ b/languages/en.php
@@ -649,7 +649,26 @@ To remove a widget drag it back to the <b>Widget gallery</b>.",
'deleteconfirm' => "Are you sure you want to delete this item?",
'fileexists' => "A file has already been uploaded. To replace it, select it below:",
-
+
+ /**
+ * User add
+ */
+
+ 'useradd:subject' => 'User account created',
+ 'useradd:body' => '
+%s,
+
+A user account has been created for you at %s. To log in, visit:
+
+ %s
+
+And log in with these user credentials:
+
+ Username: %s
+ Password: %s
+
+Once you have logged in, we highly recommend that you change your password.
+',
/**
* System messages