diff options
| author | Syndamia <kamen@syndamia.com> | 2025-02-01 10:02:14 +0200 |
|---|---|---|
| committer | Syndamia <kamen@syndamia.com> | 2025-02-01 10:28:22 +0200 |
| commit | faabc462d3080cac67687f450135a078731fb3d1 (patch) | |
| tree | b0d050b510386c3abcc48852bda16480b7c27e8e /models/user.php | |
| parent | 5a0d4f4a00c9162fbf773ca6b73d34354c6650fe (diff) | |
| download | nowayforward_human-faabc462d3080cac67687f450135a078731fb3d1.tar nowayforward_human-faabc462d3080cac67687f450135a078731fb3d1.tar.gz nowayforward_human-faabc462d3080cac67687f450135a078731fb3d1.zip | |
feat: Rework models methods to be more object-oriented where applicable
Diffstat (limited to 'models/user.php')
| -rw-r--r-- | models/user.php | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/models/user.php b/models/user.php index eff2c3e..04f5a83 100644 --- a/models/user.php +++ b/models/user.php @@ -31,7 +31,19 @@ class User extends Table { ); } - static function get_all() : array { - return Table::_get_all("Users", "Database\User"); + function archives() : array { + return Table::_get_all( + 'Webpages', + 'Database\Webpage', + "WHERE RequesterUID = \"$this->UID\" ORDER BY Date DESC" + ); + } + + function archiveLists() : array { + return Table::_get_all( + 'ArchiveLists', + 'Database\ArchiveList', + "WHERE AuthorUID = \"$this->UID\"" + ); } } |
