diff options
author | Dries Buytaert <dries@buytaert.net> | 2001-04-19 19:54:37 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2001-04-19 19:54:37 +0000 |
commit | a6e6dfb9219ebea34331ad46c9c43d53f7c3ca6f (patch) | |
tree | e4939696a62e748dbe7732480b62c7a1399be94b /account.php | |
parent | 78cd8cda097f6c6361090980f0664bbf939dafdd (diff) | |
download | brdo-a6e6dfb9219ebea34331ad46c9c43d53f7c3ca6f.tar.gz brdo-a6e6dfb9219ebea34331ad46c9c43d53f7c3ca6f.tar.bz2 |
- Addition: added 2 new functions check_mail() and check_name()
to functions.inc useful for resp. verifying an e-mail address
and username: currently used by account.php - but reusable by
Julian's refer.module for example (prepares integration).
Diffstat (limited to 'account.php')
-rw-r--r-- | account.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/account.php b/account.php index 3146e7f95..1e96f1f9d 100644 --- a/account.php +++ b/account.php @@ -296,8 +296,8 @@ function account_user($uname) { function account_validate($user) { // Verify username and e-mail address: - if (empty($user[real_email]) || (!eregi("^[_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,3}$", $user[real_email]))) $error = t("the e-mail address '$user[real_email]' is not valid"); - if (empty($user[userid]) || (ereg("[^a-zA-Z0-9_-]", $user[userid]))) $error = t("the username '$user[userid]' is not valid"); + if (empty($user[real_email]) || (!check_mail($user[real_email]))) $error = t("the e-mail address '$user[real_email]' is not valid"); + if (empty($user[userid]) || (!check_name($user[userid]))) $error = t("the username '$user[userid]' is not valid"); if (strlen($user[userid]) > 15) $error = t("the username '$user[userid]' is too long: it must be less than 15 characters"); // Check to see whether the username or e-mail address are banned: |