aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mod/profile/actions/edit.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/mod/profile/actions/edit.php b/mod/profile/actions/edit.php
index c3673e4e6..36f13eb42 100644
--- a/mod/profile/actions/edit.php
+++ b/mod/profile/actions/edit.php
@@ -47,8 +47,11 @@
$access_id = 0;
}
if (is_array($value)) {
+ $i = 0;
foreach($value as $interval) {
- create_metadata($user->guid, $shortname, $interval, 'text', $user->guid, $access_id, true);
+ $i++;
+ if ($i == 1) { $multiple = false; } else { $multiple = true; }
+ create_metadata($user->guid, $shortname, $interval, 'text', $user->guid, $access_id, $multiple);
}
} else {
create_metadata($user->guid, $shortname, $value, 'text', $user->guid, $access_id);