aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_user.php
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2010-12-28 22:40:09 +0100
committerAndreas Fischer <bantu@phpbb.com>2010-12-28 22:40:09 +0100
commit6e51e52f0c0f34a5dea8e3e1730de039ed5895e6 (patch)
tree77a05c95078c7f86bfd1c5ae3780788198694e0e /phpBB/includes/functions_user.php
parent90ccdb4dad6521fe0431ab1e9373c5821156bc46 (diff)
parent6b4d0a254218e8d40151ca1bdff8c439f89502e9 (diff)
downloadforums-6e51e52f0c0f34a5dea8e3e1730de039ed5895e6.tar
forums-6e51e52f0c0f34a5dea8e3e1730de039ed5895e6.tar.gz
forums-6e51e52f0c0f34a5dea8e3e1730de039ed5895e6.tar.bz2
forums-6e51e52f0c0f34a5dea8e3e1730de039ed5895e6.tar.xz
forums-6e51e52f0c0f34a5dea8e3e1730de039ed5895e6.zip
Merge branch 'ticket/igorw/9574' into develop
* ticket/igorw/9574: [ticket/9574] Add pcre_utf8_support() function [ticket/9574] Remove conditional PHP<5.2 code [ticket/9574] Drop fallback implementations
Diffstat (limited to 'phpBB/includes/functions_user.php')
-rw-r--r--phpBB/includes/functions_user.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php
index 8d6ed07aa0..b99393d24a 100644
--- a/phpBB/includes/functions_user.php
+++ b/phpBB/includes/functions_user.php
@@ -1490,7 +1490,7 @@ function validate_username($username, $allowed_username = false)
$mbstring = $pcre = false;
// generic UTF-8 character types supported?
- if ((version_compare(PHP_VERSION, '5.1.0', '>=') || (version_compare(PHP_VERSION, '5.0.0-dev', '<=') && version_compare(PHP_VERSION, '4.4.0', '>='))) && @preg_match('/\p{L}/u', 'a') !== false)
+ if (pcre_utf8_support())
{
$pcre = true;
}
@@ -1626,7 +1626,7 @@ function validate_password($password)
$pcre = $mbstring = false;
// generic UTF-8 character types supported?
- if ((version_compare(PHP_VERSION, '5.1.0', '>=') || (version_compare(PHP_VERSION, '5.0.0-dev', '<=') && version_compare(PHP_VERSION, '4.4.0', '>='))) && @preg_match('/\p{L}/u', 'a') !== false)
+ if (pcre_utf8_support())
{
$upp = '\p{Lu}';
$low = '\p{Ll}';