aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_user.php
diff options
context:
space:
mode:
author3D-I <marktravai@gmail.com>2019-03-31 07:34:27 +0200
committer3D-I <marktravai@gmail.com>2019-03-31 07:35:19 +0200
commitb89044888275dac3ad7b139d6e9dc27c59cb3135 (patch)
tree819a2a0e9e822f0c990d4dfadc2a9ba023696679 /phpBB/includes/functions_user.php
parentdc610b5508a33c2e8932f5d0624a1fa1db4ad732 (diff)
downloadforums-b89044888275dac3ad7b139d6e9dc27c59cb3135.tar
forums-b89044888275dac3ad7b139d6e9dc27c59cb3135.tar.gz
forums-b89044888275dac3ad7b139d6e9dc27c59cb3135.tar.bz2
forums-b89044888275dac3ad7b139d6e9dc27c59cb3135.tar.xz
forums-b89044888275dac3ad7b139d6e9dc27c59cb3135.zip
[ticket/16004] Amend the whole docblock
PHPBB3-16004
Diffstat (limited to 'phpBB/includes/functions_user.php')
-rw-r--r--phpBB/includes/functions_user.php27
1 files changed, 15 insertions, 12 deletions
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php
index dbd260a4e9..6ea615ee2f 100644
--- a/phpBB/includes/functions_user.php
+++ b/phpBB/includes/functions_user.php
@@ -1687,17 +1687,20 @@ function phpbb_validate_timezone($timezone)
return (in_array($timezone, phpbb_get_timezone_identifiers($timezone))) ? false : 'TIMEZONE_INVALID';
}
-/**
-* Check to see if the username has been taken, or if it is disallowed.
-* Also checks if it includes the " character, which we don't allow in usernames.
-* Also checks if it includes the 4-bytes Unicode characters (emojis), which we don't allow in usernames.
-* Used for registering, changing names, and posting anonymously with a username
-*
-* @param string $username The username to check
-* @param string $allowed_username An allowed username, default being $user->data['username']
-*
-* @return mixed Either false if validation succeeded or a string which will be used as the error message (with the variable name appended)
-*/
+/***
+ * Validate Username
+ *
+ * Check to see if the username has been taken, or if it is disallowed.
+ * Also checks if it includes the " character or the 4-bytes Unicode ones
+ * (aka emojis) which we don't allow in usernames.
+ * Used for registering, changing names, and posting anonymously with a username
+ *
+ * @param string $username The username to check
+ * @param string $allowed_username An allowed username, default being $user->data['username']
+ *
+ * @return mixed Either false if validation succeeded or a string which will be
+ * used as the error message (with the variable name appended)
+ */
function validate_username($username, $allowed_username = false)
{
global $config, $db, $user, $cache;
@@ -1715,7 +1718,7 @@ function validate_username($username, $allowed_username = false)
// not supported by utf8_bin in MySQL
if (preg_match('/[\x{10000}-\x{10FFFF}]/u', $username))
{
- return 'INVALID_EMOJIS_USERNAME';
+ return 'INVALID_EMOJIS';
}
// ... fast checks first.