Hide donation alert for logged in patrons

This commit is contained in:
Alex Cabal 2022-07-25 13:02:41 -05:00
parent 850ad44e83
commit d153daac3c
2 changed files with 3 additions and 1 deletions

View file

@ -1,4 +1,6 @@
<? if($GLOBALS['User'] === null){ ?>
<aside class="donation"> <aside class="donation">
<p>We rely on your support to help us keep producing beautiful, free, and unrestricted editions of literature for the digital age.</p> <p>We rely on your support to help us keep producing beautiful, free, and unrestricted editions of literature for the digital age.</p>
<p>Will you <a href="/donate">support our efforts with a donation</a>?</p> <p>Will you <a href="/donate">support our efforts with a donation</a>?</p>
</aside> </aside>
<? } ?>

View file

@ -1,7 +1,7 @@
<? <?
// Hide the alert if the user has closed it // Hide the alert if the user has closed it
if(!DONATION_DRIVE_ON || ($autoHide ?? $_COOKIE['hide-donation-alert'] ?? false)){ if(!DONATION_DRIVE_ON || ($autoHide ?? $_COOKIE['hide-donation-alert'] ?? false) || $GLOBALS['User'] !== null){
return; return;
} }