diff --git a/lib/User.php b/lib/User.php index 456da5f5..6edf2447 100644 --- a/lib/User.php +++ b/lib/User.php @@ -9,7 +9,6 @@ use function Safe\preg_match; * @property bool $IsRegistered A user is "registered" if they have an entry in the `Benefits` table; a password is required to log in. * @property Benefits $Benefits * @property string $Url - * @property bool $IsPatron * @property ?Patron $Patron * @property ?NewsletterSubscription $NewsletterSubscription */ @@ -30,7 +29,6 @@ class User{ protected array $_Payments; protected Benefits $_Benefits; protected string $_Url; - protected bool $_IsPatron; protected ?Patron $_Patron; protected ?NewsletterSubscription $_NewsletterSubscription; @@ -39,14 +37,6 @@ class User{ // GETTERS // ******* - protected function GetIsPatron(): bool{ - if(!isset($this->_IsPatron)){ - $this->GetPatron(); - } - - return $this->_IsPatron; - } - protected function GetNewsletterSubscription(): ?NewsletterSubscription{ if(!isset($this->_NewsletterSubscription)){ try{ @@ -64,16 +54,9 @@ class User{ if(!isset($this->_Patron)){ try{ $this->_Patron = Patron::Get($this->UserId); - if($this->_Patron->Ended === null){ - $this->IsPatron = true; - } - else{ - $this->IsPatron = false; - } } catch(Exceptions\PatronNotFoundException){ $this->_Patron = null; - $this->IsPatron = false; } } diff --git a/www/css/user.css b/www/css/user.css index 055691d0..cb425460 100644 --- a/www/css/user.css +++ b/www/css/user.css @@ -7,6 +7,10 @@ label:has(input[name="password-action"]) + label{ margin-top: .5rem; } +h2 + table{ + margin-top: .5rem; +} + table td{ padding: .5rem; vertical-align: top; diff --git a/www/users/get.php b/www/users/get.php index df1da786..fa8a2e77 100644 --- a/www/users/get.php +++ b/www/users/get.php @@ -78,13 +78,21 @@ catch(Exceptions\SeeOtherException $ex){