aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorcash <cash.costello@gmail.com>2011-10-05 21:28:30 -0400
committercash <cash.costello@gmail.com>2011-10-05 21:28:30 -0400
commit4706f47ca0b19d9baa45742ae7c8d270c42e9490 (patch)
treea89a44d6138c448e0f26030096179369d9a4350d /engine
parent2be122cb5032567e88bb926b8aac250fd488cf68 (diff)
downloadelgg-4706f47ca0b19d9baa45742ae7c8d270c42e9490.tar.gz
elgg-4706f47ca0b19d9baa45742ae7c8d270c42e9490.tar.bz2
Fixes #3704 displaying error messages when adding users through admin interface
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/users.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/engine/lib/users.php b/engine/lib/users.php
index 2d6b7cabd..ce1b409f6 100644
--- a/engine/lib/users.php
+++ b/engine/lib/users.php
@@ -813,6 +813,7 @@ function validate_username($username) {
if (
preg_match($blacklist, $username)
) {
+ // @todo error message needs work
throw new RegistrationException(elgg_echo('registration:invalidchars'));
}
@@ -823,6 +824,7 @@ function validate_username($username) {
for ($n = 0; $n < strlen($blacklist2); $n++) {
if (strpos($username, $blacklist2[$n]) !== false) {
$msg = elgg_echo('registration:invalidchars', array($blacklist2[$n], $blacklist2));
+ $msg = htmlentities($msg, ENT_COMPAT, 'UTF-8');
throw new RegistrationException($msg);
}
}