likely the last commit had a serious vulnerability. this is just a sync
Deploy vintagecoding.net / deploy (push) Canceled after 0s

This commit is contained in:
2025-06-10 10:46:22 -06:00
parent becfbc3628
commit ae76b11a87
8 changed files with 304 additions and 324 deletions
+41
View File
@@ -0,0 +1,41 @@
<?php
class SpaceMember
{
private int $id;
private User $user;
private Space $space;
private int $role;
private DateTime $addedAt;
private bool $favorited;
public function __construct(int $id, User $user, Space $space, int $role, DateTime $addedAt, bool $favorited)
{
error_log('Instantiating a space member');
if (!User::exists($user->getId()) || !Space::exists($space->getId()))
return;
$this->user = $user;
$this->space = $space;
$this->role = $role;
$this->addedAt = $addedAt;
$this->favorited = $favorited;
if ($id < 0) {
$this->id = $id * -1;
$stmt = 'INSERT INTO spaceMembers (id, user, space, role, favorited) VALUES (?, ?, ?, ?, ?)';
exec_stmt($stmt, 'iiiii', $this->id, $user->getId(), $space->getId(), $role, $favorited);
}
}
public function getUser()
{
return $this->user;
}
public function getSpace()
{
return $this->space;
}
}