aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2022-04-25 21:34:05 +0200
committerMario Vavti <mario@mariovavti.com>2022-04-25 21:34:05 +0200
commitb94da93c74fa3cebee50f7756a148ef1df0efe07 (patch)
treec8231c842a7b450cfaee24f9819e12868fc82a56
parent695045f19740f1f4619a50594b494d81456896c7 (diff)
downloadvolse-hubzilla-b94da93c74fa3cebee50f7756a148ef1df0efe07.tar.gz
volse-hubzilla-b94da93c74fa3cebee50f7756a148ef1df0efe07.tar.bz2
volse-hubzilla-b94da93c74fa3cebee50f7756a148ef1df0efe07.zip
if we have not been provided a profile id set the profile id to the default profile - fixes #1671
-rw-r--r--Zotlabs/Module/Profile_photo.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/Zotlabs/Module/Profile_photo.php b/Zotlabs/Module/Profile_photo.php
index 022efc2cd..ecfbca662 100644
--- a/Zotlabs/Module/Profile_photo.php
+++ b/Zotlabs/Module/Profile_photo.php
@@ -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'])) {