From 8cba20fbf5da8fa1b5bedf4a5e4c26ea6f782b7d Mon Sep 17 00:00:00 2001 From: Alex Cabal Date: Sun, 1 Dec 2024 17:01:18 -0600 Subject: [PATCH] Fix Patron logic in user detail page --- lib/User.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/User.php b/lib/User.php index 038a1be4..684a175d 100644 --- a/lib/User.php +++ b/lib/User.php @@ -64,7 +64,12 @@ class User{ if(!isset($this->_Patron)){ try{ $this->_Patron = Patron::Get($this->UserId); - $this->IsPatron = true; + if($this->_Patron->Ended === null){ + $this->IsPatron = true; + } + else{ + $this->IsPatron = false; + } } catch(Exceptions\PatronNotFoundException){ $this->_Patron = null;