Cleanup some classes and improve the Accounts and Contacts

This commit is contained in:
djmaze 2021-11-10 21:24:19 +01:00
parent 7ea4365ccb
commit ef4790d04e
25 changed files with 159 additions and 192 deletions

View file

@ -2,11 +2,11 @@
namespace RainLoop\Actions;
use \RainLoop\Notifications;
use \RainLoop\Utils;
use \RainLoop\Model\Account;
use \RainLoop\Providers\Storage\Enumerations\StorageType;
use \RainLoop\Exceptions\ClientException;
use RainLoop\Notifications;
use RainLoop\Utils;
use RainLoop\Model\Account;
use RainLoop\Providers\Storage\Enumerations\StorageType;
use RainLoop\Exceptions\ClientException;
trait UserAuth
{
@ -145,12 +145,7 @@ trait UserAuth
*/
public function GetAccountFromCustomToken(string $sToken): ?Account
{
return empty($sToken) ? null
: Account::NewInstanceFromTokenArray(
$this,
Utils::DecodeKeyValues($sToken),
false
);
return empty($sToken) ? null : Account::NewInstanceFromAuthToken($sToken);
}
/**