diff options
author | Dries Buytaert <dries@buytaert.net> | 2005-12-15 16:34:48 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2005-12-15 16:34:48 +0000 |
commit | 21707ae0e6b5467c0f70252674a5a7e9aad99370 (patch) | |
tree | 5b708a937cb69633c719e4088cc3bdf379f3aee8 /modules/profile.module | |
parent | 21a9442bbbf31f6a311994165ae88ed2a21bbe9a (diff) | |
download | brdo-21707ae0e6b5467c0f70252674a5a7e9aad99370.tar.gz brdo-21707ae0e6b5467c0f70252674a5a7e9aad99370.tar.bz2 |
- Modified patch #41120 by chx: profile category 'account' overwrites regular user fields.
Diffstat (limited to 'modules/profile.module')
-rw-r--r-- | modules/profile.module | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/profile.module b/modules/profile.module index cdb6fa98a..4b9401776 100644 --- a/modules/profile.module +++ b/modules/profile.module @@ -462,13 +462,11 @@ function profile_user($type, &$edit, &$user, $category = NULL) { function profile_validate_form($edit) { // Validate the title: - if (!$edit['title']) { form_set_error('title', t('You must enter a title.')); } // Validate the 'form name': - if (eregi('[^a-z0-9_-]', $edit['name'])) { form_set_error('name', t('The specified form name contains one or more illegal characters. Spaces or any other special characters expect dash (-) and underscore (_) are not allowed.')); } @@ -481,6 +479,10 @@ function profile_validate_form($edit) { if (!$edit['category']) { form_set_error('category', t('You must enter a category.')); } + + if ($edit['category'] == 'account') { + form_set_error('category', t('The specified category name is reserved for use by Drupal.')); + } } /** |