Refactor session initialization and host validation logic
This commit is contained in:
parent
738f8a455c
commit
c380556255
5 changed files with 138 additions and 44 deletions
|
@ -3,6 +3,7 @@
|
|||
namespace Socialbox\Objects;
|
||||
|
||||
use InvalidArgumentException;
|
||||
use Socialbox\Classes\Configuration;
|
||||
use Socialbox\Classes\Validator;
|
||||
use Socialbox\Enums\ReservedUsernames;
|
||||
|
||||
|
@ -67,7 +68,7 @@
|
|||
*/
|
||||
public function isHost(): bool
|
||||
{
|
||||
return $this->username === ReservedUsernames::HOST->value;
|
||||
return $this->username === ReservedUsernames::HOST->value && $this->domain === Configuration::getInstanceConfiguration()->getDomain();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue