summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/profile.module4
-rw-r--r--modules/profile/profile.module4
2 files changed, 6 insertions, 2 deletions
diff --git a/modules/profile.module b/modules/profile.module
index 48c8e1aa9..64814694e 100644
--- a/modules/profile.module
+++ b/modules/profile.module
@@ -660,7 +660,9 @@ function profile_form_profile($edit, $user, $category) {
);
break;
case 'selection':
- $options = array('--');
+ if (!$field->required) {
+ $options = array('--');
+ }
$lines = split("[,\n\r]", $field->options);
foreach ($lines as $line) {
if ($line = trim($line)) {
diff --git a/modules/profile/profile.module b/modules/profile/profile.module
index 48c8e1aa9..64814694e 100644
--- a/modules/profile/profile.module
+++ b/modules/profile/profile.module
@@ -660,7 +660,9 @@ function profile_form_profile($edit, $user, $category) {
);
break;
case 'selection':
- $options = array('--');
+ if (!$field->required) {
+ $options = array('--');
+ }
$lines = split("[,\n\r]", $field->options);
foreach ($lines as $line) {
if ($line = trim($line)) {