mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-03 06:27:02 +03:00
Bugfix: @param/@return documentation was incorrect which caused errors
This commit is contained in:
parent
7eb1defa16
commit
b81b36d120
10 changed files with 33 additions and 32 deletions
|
|
@ -631,7 +631,7 @@ class Actions
|
|||
/**
|
||||
* @throws \RainLoop\Exceptions\ClientException
|
||||
*/
|
||||
public function GetAccount(bool $bThrowExceptionOnFalse = false) : \RainLoop\Model\Account
|
||||
public function GetAccount(bool $bThrowExceptionOnFalse = false) : ?\RainLoop\Model\Account
|
||||
{
|
||||
return $this->getAccountFromToken($bThrowExceptionOnFalse);
|
||||
}
|
||||
|
|
@ -1082,9 +1082,9 @@ class Actions
|
|||
/**
|
||||
* @throws \RainLoop\Exceptions\ClientException
|
||||
*/
|
||||
public function GetAccountFromCustomToken(string $sToken, bool $bThrowExceptionOnFalse = true, bool $bValidateShortToken = true, bool $bQ = false) : \RainLoop\Model\Account
|
||||
public function GetAccountFromCustomToken(string $sToken, bool $bThrowExceptionOnFalse = true, bool $bValidateShortToken = true, bool $bQ = false) : ?\RainLoop\Model\Account
|
||||
{
|
||||
$oResult = false;
|
||||
$oResult = null;
|
||||
if (!empty($sToken))
|
||||
{
|
||||
$aAccountHash = $bQ ? \RainLoop\Utils::DecodeKeyValuesQ($sToken) : \RainLoop\Utils::DecodeKeyValues($sToken);
|
||||
|
|
@ -1127,9 +1127,9 @@ class Actions
|
|||
return $oResult;
|
||||
}
|
||||
|
||||
public function GetAccountFromSignMeToken() : \RainLoop\Model\Account
|
||||
public function GetAccountFromSignMeToken() : ?\RainLoop\Model\Account
|
||||
{
|
||||
$oAccount = false;
|
||||
$oAccount = null;
|
||||
|
||||
$sSignMeToken = \RainLoop\Utils::GetCookie(\RainLoop\Actions::AUTH_SIGN_ME_TOKEN_KEY, '');
|
||||
if (!empty($sSignMeToken))
|
||||
|
|
@ -1166,7 +1166,7 @@ class Actions
|
|||
/**
|
||||
* @throws \RainLoop\Exceptions\ClientException
|
||||
*/
|
||||
public function getAccountFromToken(bool $bThrowExceptionOnFalse = true) : \RainLoop\Model\Account
|
||||
public function getAccountFromToken(bool $bThrowExceptionOnFalse = true) : ?\RainLoop\Model\Account
|
||||
{
|
||||
return $this->GetAccountFromCustomToken($this->getLocalAuthToken(), $bThrowExceptionOnFalse, true, true);
|
||||
}
|
||||
|
|
@ -1307,7 +1307,7 @@ NewThemeLink IncludeCss LoadingDescriptionEsc TemplatesLink LangLink IncludeBack
|
|||
if (!$bAdmin)
|
||||
{
|
||||
$oAccount = $this->getAccountFromToken(false);
|
||||
if ($oAccount instanceof \RainLoop\Model\Account)
|
||||
if ($oAccount)
|
||||
{
|
||||
$aResult['IncludeCss'] = $aResult['UserCss'];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue