Commit 21707ae0 authored by Dries's avatar Dries
Browse files

- Modified patch #41120 by chx: profile category 'account' overwrites regular user fields.

parent 21a9442b
......@@ -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.'));
}
}
/**
......
......@@ -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.'));
}
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment