Return default profile photo if no profile photo is set
This commit is contained in:
parent
9b2e3fa916
commit
0ada604c7d
|
@ -150,7 +150,7 @@ class Photo extends BaseModule
|
||||||
|
|
||||||
$photo = MPhoto::selectFirst([], ["scale" => $scale, "uid" => $uid, "profile" => 1]);
|
$photo = MPhoto::selectFirst([], ["scale" => $scale, "uid" => $uid, "profile" => 1]);
|
||||||
if ($photo===false) {
|
if ($photo===false) {
|
||||||
// todo default image info
|
$photo = MPhoto::createPhotoForSystemResource($default);
|
||||||
}
|
}
|
||||||
return $photo;
|
return $photo;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue