diff options
author | Steven Wittens <steven@10.no-reply.drupal.org> | 2007-01-11 03:31:18 +0000 |
---|---|---|
committer | Steven Wittens <steven@10.no-reply.drupal.org> | 2007-01-11 03:31:18 +0000 |
commit | 7f2a4fbfc5f2929ea21cd66ac9623806911b3b36 (patch) | |
tree | 2681ffdb3ec3ee70b628272ec81c50410029186c /modules | |
parent | c4c9d2a5d5b433f1e6f46e290487bb5685bdb560 (diff) | |
download | brdo-7f2a4fbfc5f2929ea21cd66ac9623806911b3b36.tar.gz brdo-7f2a4fbfc5f2929ea21cd66ac9623806911b3b36.tar.bz2 |
#108379: Faster profile field validation (eregi to preg_match)
Diffstat (limited to 'modules')
-rw-r--r-- | modules/profile/profile.module | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/profile/profile.module b/modules/profile/profile.module index 05ad71d1a..23cd8bc34 100644 --- a/modules/profile/profile.module +++ b/modules/profile/profile.module @@ -306,7 +306,7 @@ Unless you know what you are doing, it is highly recommended that you prefix the */ function profile_field_form_validate($form_id, $form_values) { // Validate the 'field name': - if (eregi('[^a-z0-9_-]', $form_values['name'])) { + if (preg_match('/[^a-zA-Z0-9_-]/', $form_values['name'])) { form_set_error('name', t('The specified form name contains one or more illegal characters. Spaces or any other special characters except dash (-) and underscore (_) are not allowed.')); } |