diff --git a/include/contact_selectors.php b/include/contact_selectors.php
index 56c032847..f5dfdc12d 100644
--- a/include/contact_selectors.php
+++ b/include/contact_selectors.php
@@ -9,12 +9,12 @@ function contact_profile_assign($current,$foreign_net) {
$o .= "\r\n";
- $r = q("SELECT `id`, `profile-name` FROM `profile` WHERE `uid` = %d",
+ $r = q("SELECT `id`, `profile-name`, `is-default` FROM `profile` WHERE `uid` = %d",
intval($_SESSION['uid']));
if (dbm::is_result($r)) {
foreach ($r as $rr) {
- $selected = (($rr['id'] == $current) ? " selected=\"selected\" " : "");
+ $selected = (($rr['id'] == $current || ($current == 0 && $rr['is-default'] == 1)) ? " selected=\"selected\" " : "");
$o .= "\r\n";
}
}