+
+use Scalar::Util qw(blessed);
+my $user_logo = blessed $RT::System ? $RT::System->FirstAttribute('UserLogo') : undef;
+
+# If we have the attribute, but no content, we don't really have a user logo
+if ($user_logo) {
+ my $content = $user_logo->Content;
+ undef $user_logo
+ unless ref $content eq 'HASH'
+ and defined $content->{'data'};
+}
+
+if ($OnlyCustom
+ and not $user_logo
+ and ($ARGS{LogoURL}||RT->Config->Get('LogoURL')) =~ /bpslogo\.png$/)
+{
+ return;
+}