Update password handling and session methods
This commit is contained in:
parent
8b9896f196
commit
85814913e4
11 changed files with 239 additions and 70 deletions
|
@ -228,13 +228,14 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* Determines if the server is external.
|
||||
* Determines if the user is considered external by checking if the username is 'host' and the server
|
||||
* is not the same as the domain from the configuration.
|
||||
*
|
||||
* @return bool True if the server is external, false otherwise.
|
||||
* @return bool True if the user is external, false otherwise.
|
||||
*/
|
||||
public function isExternal(): bool
|
||||
{
|
||||
return $this->server === 'host';
|
||||
return $this->username === 'host' && $this->server !== Configuration::getInstanceConfiguration()->getDomain();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -260,6 +260,17 @@
|
|||
return $this->clientVersion;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether the session is external.
|
||||
*
|
||||
* @return bool True if the session is external, false otherwise.
|
||||
* @throws DatabaseOperationException Thrown if the peer record cannot be retrieved.
|
||||
*/
|
||||
public function isExternal(): bool
|
||||
{
|
||||
return RegisteredPeerManager::getPeer($this->peerUuid)->isExternal();
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts the current session state into a standard session state object.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue