diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/channel.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/channel.php b/include/channel.php index 42a392e8e..1a62dcd3c 100644 --- a/include/channel.php +++ b/include/channel.php @@ -1776,6 +1776,17 @@ function get_default_profile_photo($size = 300) { if(! $scheme) $scheme = 'rainbow_man'; + if(! is_dir('images/default_profile_photos/' . $scheme)) { + $x = [ 'scheme' => $scheme, 'size' => $size, 'url' => '' ]; + call_hooks('default_profile_photo',$x); + if($x['url']) { + return $x['url']; + } + else { + $scheme = 'rainbow_man'; + } + } + return 'images/default_profile_photos/' . $scheme . '/' . $size . '.png'; } |