summaryrefslogtreecommitdiff
path: root/it_user.class
diff options
context:
space:
mode:
authorChristian Schneider2009-04-22 12:49:48 +0000
committerChristian Schneider2009-04-22 12:49:48 +0000
commit3ef0c43348c8f735bab740e4a9b7bf8df26fbb00 (patch)
tree93c63c624528a013f0efcad223ac3b49cdf0f13f /it_user.class
parent414cc575912785ef15e4a26eb002bef1d0f739bf (diff)
downloaditools-3ef0c43348c8f735bab740e4a9b7bf8df26fbb00.tar.gz
itools-3ef0c43348c8f735bab740e4a9b7bf8df26fbb00.tar.bz2
itools-3ef0c43348c8f735bab740e4a9b7bf8df26fbb00.zip
Get rid of ereg/split, replaced by preg equivalents
Diffstat (limited to 'it_user.class')
-rw-r--r--it_user.class6
1 files changed, 3 insertions, 3 deletions
diff --git a/it_user.class b/it_user.class
index 85c44bd..328819b 100644
--- a/it_user.class
+++ b/it_user.class
@@ -385,7 +385,7 @@ function is_valid_username($name)
{
if ((strlen($name) >= 2) && (strlen($name) <= 32))
{
- if (!ereg('["\'\\&\$+]', $name))
+ if (!preg_match('/["\'\\\\&$+]/', $name))
return true;
}
return false;
@@ -399,7 +399,7 @@ function is_valid_password($word)
{
if ((strlen($word) >= 2) && (strlen($word) <= 32))
{
- if (!ereg('["\'\\&\$+]', $word))
+ if (!preg_match('/["\'\\\\&$+]/', $word))
return true;
}
return false;
@@ -492,7 +492,7 @@ function check_url($withsession = false)
if (!empty($_SERVER['QUERY_STRING']))
{
- $url = ereg_replace("&?$this->urlauthenticationcode=[a-zA-Z0-9]*", '', $_SERVER['REQUEST_URI']);
+ $url = preg_replace("/&?$this->urlauthenticationcode=[a-zA-Z0-9]*/", '', $_SERVER['REQUEST_URI']);
$result = $this->check_signature($url, $GLOBALS[$this->urlauthenticationcode], $withsession);
}