aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_validate.php
diff options
context:
space:
mode:
authorPaul S. Owen <psotfx@users.sourceforge.net>2002-04-20 00:22:29 +0000
committerPaul S. Owen <psotfx@users.sourceforge.net>2002-04-20 00:22:29 +0000
commit5b0bba72b1c619af2f39859ec0c262f860f991ac (patch)
tree9fb003cf223ff6bf2e26feb78a35603dff88a471 /phpBB/includes/functions_validate.php
parent65aa92182826eb06830626df49ab7a0210b06718 (diff)
downloadforums-5b0bba72b1c619af2f39859ec0c262f860f991ac.tar
forums-5b0bba72b1c619af2f39859ec0c262f860f991ac.tar.gz
forums-5b0bba72b1c619af2f39859ec0c262f860f991ac.tar.bz2
forums-5b0bba72b1c619af2f39859ec0c262f860f991ac.tar.xz
forums-5b0bba72b1c619af2f39859ec0c262f860f991ac.zip
merged from 2.0.0 branch (marked merge_point_20020420) + assorted updates and trial stuff for example session alterations
git-svn-id: file:///svn/phpbb/trunk@2532 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_validate.php')
-rw-r--r--phpBB/includes/functions_validate.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/phpBB/includes/functions_validate.php b/phpBB/includes/functions_validate.php
index 4d61a44458..22b4c1c185 100644
--- a/phpBB/includes/functions_validate.php
+++ b/phpBB/includes/functions_validate.php
@@ -63,7 +63,7 @@ function validate_username($username)
{
while( $row = $db->sql_fetchrow($result) )
{
- if ( preg_match("#\b(" . str_replace("\*", "\w*?", preg_quote($row['disallow_username'])) . ")\b#i", $username) )
+ if ( preg_match("#\b(" . str_replace("\*", ".*?", preg_quote($row['disallow_username'])) . ")\b#i", $username) )
{
return array('error' => true, 'error_msg' => $lang['Username_disallowed']);
}
@@ -76,7 +76,7 @@ function validate_username($username)
{
while( $row = $db->sql_fetchrow($result) )
{
- if ( preg_match("#\b(" . str_replace("\*", "\w*?", preg_quote($row['word'])) . ")\b#i", $username) )
+ if ( preg_match("#\b(" . str_replace("\*", ".*?", preg_quote($row['word'])) . ")\b#i", $username) )
{
return array('error' => true, 'error_msg' => $lang['Username_disallowed']);
}
@@ -102,7 +102,7 @@ function validate_email($email)
if ( $email != '' )
{
- if ( preg_match('/^[a-z0-9\.\-_]+@[a-z0-9\-_]+\.([a-z0-9\-_]+\.)*?[a-z]+$/is', $email) )
+ if ( preg_match('/^[a-z0-9\.\-_\+]+@[a-z0-9\-_]+\.([a-z0-9\-_]+\.)*?[a-z]+$/is', $email) )
{
$sql = "SELECT ban_email
FROM " . BANLIST_TABLE;
@@ -110,7 +110,7 @@ function validate_email($email)
{
while( $row = $db->sql_fetchrow($result) )
{
- $match_email = str_replace('*', '.*', $row['ban_email']);
+ $match_email = str_replace('*', '.*?', $row['ban_email']);
if ( preg_match('/^' . $match_email . '$/is', $email) )
{
return array('error' => true, 'error_msg' => $lang['Email_banned']);