[ljcom] r13002: LJSUP-14485: Identity and unlogged user ...
Committer: wisest-owl
LJSUP-14485: Identity and unlogged user shouldn't be able to buy or view example of theme applyingU trunk/cgi-bin/LJ/Hooks/Customize.pm
Modified: trunk/cgi-bin/LJ/Hooks/Customize.pm
===================================================================
--- trunk/cgi-bin/LJ/Hooks/Customize.pm 2012-12-06 08:28:23 UTC (rev 13001)
+++ trunk/cgi-bin/LJ/Hooks/Customize.pm 2012-12-06 11:23:59 UTC (rev 13002)
@@ -270,7 +270,7 @@
$needed_acct_type = "plus" if $plus_allow_layers{$theme->uniq} || $plus_allow_layers{$theme->layout_uniq};
my $upgrade_url = "$LJ::SITEROOT/manage/account/";
- if ($u->is_comm) {
+ if ($u && $u->is_comm) {
if ($needed_acct_type eq "plus") {
$upgrade_url = "$LJ::SITEROOT/community/account.bml?authas=" . $u->user;
} else { # paid
@@ -303,7 +303,7 @@
my $u = shift;
my $theme = shift;
- return "" if $u->get_cap('paid');
+ return "" if $u && $u->get_cap('paid');
my $upgrade_url = LJ::run_hook("customize_upgrade_url", $u, $theme);
