aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-02-03 09:54:19 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-02-03 09:54:19 +0000
commite5dd455c337385609cf1ede94a4f6262b3124f5e (patch)
tree4520d26f716ed87354dafb81e12f01a636d47dc9
parentb11377b221af8a6fbc396d204d2dabc6af128a99 (diff)
downloadelgg-e5dd455c337385609cf1ede94a4f6262b3124f5e.tar.gz
elgg-e5dd455c337385609cf1ede94a4f6262b3124f5e.tar.bz2
Users are now notified when an account has been created for them on a site.
git-svn-id: https://code.elgg.org/elgg/trunk@2630 36083f99-b078-4883-b0ff-0f9b5a30f544
-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