auth
This commit is contained in:
@ -6,6 +6,8 @@ use App\Const\RedisConst;
|
||||
use App\Tools\Tools;
|
||||
use Illuminate\Support\Carbon;
|
||||
use Illuminate\Support\Facades\Redis;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\NotFoundExceptionInterface;
|
||||
|
||||
class AuthService
|
||||
{
|
||||
@ -52,7 +54,7 @@ class AuthService
|
||||
function getAllTokenInfoByUid($iUid)
|
||||
{
|
||||
$sTokenList = Redis::get(RedisConst::UID_TOKENS . $iUid);
|
||||
if (empty($sToken)) return null;
|
||||
if (empty($sTokenList)) return null;
|
||||
return unserialize($sTokenList);
|
||||
}
|
||||
|
||||
@ -140,6 +142,10 @@ class AuthService
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
function getCurrentUser()
|
||||
{
|
||||
if(app()->has('customerUser')){
|
||||
|
||||
Reference in New Issue
Block a user