Add password login option for some users, and further refinements to artwork management system

This commit is contained in:
Alex Cabal 2024-01-06 19:10:52 -06:00
parent 8a1b11b815
commit 5a1c05d8c5
22 changed files with 234 additions and 150 deletions

View file

@ -32,8 +32,8 @@ class Session extends PropertiesBase{
// METHODS
// *******
public function Create(?string $email = null): void{
$this->User = User::GetIfRegistered($email);
public function Create(?string $email = null, ?string $password = null): void{
$this->User = User::GetIfRegistered($email, $password);
$this->UserId = $this->User->UserId;
$existingSessions = Db::Query('
@ -59,7 +59,7 @@ class Session extends PropertiesBase{
', [$this->UserId, $this->SessionId, $this->Created]);
}
$this->SetSessionCookie($this->SessionId);
self::SetSessionCookie($this->SessionId);
}
public static function GetLoggedInUser(): ?User{