From 93817fef3ead7cfd4fcde25ea2bcec02d01310a4 Mon Sep 17 00:00:00 2001 From: Jonas Kohl Date: Fri, 13 Sep 2024 19:57:43 +0200 Subject: A lot of changes again --- src/application/mystic/forum/orm/User.php | 3 ++ src/application/mystic/forum/utils/FileUtils.php | 33 ++++++++++++++++++++++ .../mystic/forum/utils/RequestUtils.php | 7 +++-- src/application/mystic/forum/utils/StringUtils.php | 4 +++ 4 files changed, 44 insertions(+), 3 deletions(-) create mode 100644 src/application/mystic/forum/utils/FileUtils.php (limited to 'src/application/mystic/forum') diff --git a/src/application/mystic/forum/orm/User.php b/src/application/mystic/forum/orm/User.php index 1db1d04..97acbaf 100644 --- a/src/application/mystic/forum/orm/User.php +++ b/src/application/mystic/forum/orm/User.php @@ -3,6 +3,7 @@ declare(strict_types=1); namespace mystic\forum\orm; +use mystic\forum\attributes\Column; use mystic\forum\attributes\PrimaryKey; use mystic\forum\attributes\Table; use mystic\forum\attributes\Unique; @@ -22,6 +23,8 @@ class User extends Entity { public bool $passwordResetRequired; public string $activationToken; public bool $activated; + #[Column(columnType: "bytea")] public ?string $profilePicture; + public ?\DateTimeImmutable $nameLastChanged; public function hasPermission(int $perm): bool { if ($this->id === self::SUPERUSER_ID) diff --git a/src/application/mystic/forum/utils/FileUtils.php b/src/application/mystic/forum/utils/FileUtils.php new file mode 100644 index 0000000..1910f0c --- /dev/null +++ b/src/application/mystic/forum/utils/FileUtils.php @@ -0,0 +1,33 @@ +