summaryrefslogtreecommitdiff
path: root/modules/profile/profile.admin.inc
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2008-02-18 16:53:37 +0000
committerDries Buytaert <dries@buytaert.net>2008-02-18 16:53:37 +0000
commit60688d68db848a94eddb4d6b3a2f6a58742b8523 (patch)
tree307b29410314cf1b10f1db88a07a25dede64f43b /modules/profile/profile.admin.inc
parent029b6b914fdef60b060e3e7db5cbaa6f303ad78e (diff)
downloadbrdo-60688d68db848a94eddb4d6b3a2f6a58742b8523.tar.gz
brdo-60688d68db848a94eddb4d6b3a2f6a58742b8523.tar.bz2
- Patch #181411 by Moshe: use schema API for saving and updating user records.
Diffstat (limited to 'modules/profile/profile.admin.inc')
-rw-r--r--modules/profile/profile.admin.inc3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/profile/profile.admin.inc b/modules/profile/profile.admin.inc
index 4a86e991f..490b48e91 100644
--- a/modules/profile/profile.admin.inc
+++ b/modules/profile/profile.admin.inc
@@ -293,7 +293,8 @@ function profile_field_form_validate($form, &$form_state) {
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.'));
}
- if (in_array($form_state['values']['name'], user_fields())) {
+ $users_table = drupal_get_schema('users');
+ if (!empty($users_table['fields'][$form_state['values']['name']])) {
form_set_error('name', t('The specified form name is reserved for use by Drupal.'));
}
// Validate the category: