UID\" ORDER BY Date DESC" ); } function archiveLists() : array { return Table::_get_all( 'ArchiveLists', 'Database\ArchiveList', "WHERE AuthorUID = \"$this->UID\"" ); } function icon() { global $VIEWS_DIR; // https://tabler.io/icons if ($this->Role === 'User') { include $VIEWS_DIR . '/img/user.svg'; } else { include $VIEWS_DIR . '/img/user-star.svg'; } } private static $AnonUID = 1; function delete() { // Applicable to Anon user if ($this->Password === '') { throw new Exception('Not deleting system account!'); } Table::_update( 'Webpages', 'RequesterUID = "' . self::$AnonUID . '"', "RequesterUID = \"$this->UID\"" ); Table::_update( 'ArchiveLists', 'AuthorUID = "' . self::$AnonUID . '"', "AuthorUID = \"$this->UID\"" ); Table::_delete( 'Users', "UID = \"$this->UID\"" ); } }