if we have not been provided a profile id set the profile id to the default profile - fixes #1671

This commit is contained in:
Mario Vavti
2022-04-25 21:34:05 +02:00
parent 695045f197
commit b94da93c74

View File

@@ -403,6 +403,10 @@ class Profile_photo extends Controller {
foreach ($r as $rr) {
if ($rr['is_default']) {
$default_profile_id = intval($rr['id']);
if (!$profile_id) {
$profile_id = $default_profile_id;
}
}
if ($profile_id === intval($rr['id'])) {