<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Member\Auth; use Illuminate\Support\Facades\Session; use Module\Member\Util\MemberGroupUtil; use Module\Member\Util\MemberUtil; use Module\Member\Util\MemberVipUtil; class MemberUser { public static function id() { return intval(Session::get('memberUserId', 0)); } public static function user() { return Session::get('_memberUser', null); } public static function isMine($nlOSA) { return self::id() > 0 && self::id() == $nlOSA; } public static function isNotMine($nlOSA) { return !self::isMine($nlOSA); } public static function isLogin() { return self::id() > 0; } public static function isNotLogin() { return !self::isLogin(); } public static function isGroup($hSHB4) { goto GKfMG; vrcKX: if ($z6C2t == 0) { $z6C2t = MemberGroupUtil::defaultGroupId(); } goto GBxZj; Du64K: if (!is_array($hSHB4)) { $hSHB4 = array(intval($hSHB4)); } goto QZR33; GBxZj: return in_array($z6C2t, $hSHB4); goto FPlBJ; GKfMG: if (self::isNotLogin()) { return false; } goto Du64K; QZR33: $z6C2t = intval(self::get('groupId', 0)); goto vrcKX; FPlBJ: } public static function isVip($ABg9n) { goto tzSd0; tzSd0: if (self::isNotLogin()) { return false; } goto FzKbZ; q1hQ4: return in_array($Ds6bM, $ABg9n); goto l1lci; Zu0nu: $Ds6bM = 0; goto Dj3eo; Dj3eo: if (!empty($IgCcr)) { $Ds6bM = $IgCcr['id']; } goto q1hQ4; ikPjt: $IgCcr = MemberVipUtil::getMemberVip(self::user()); goto Zu0nu; FzKbZ: if (!is_array($ABg9n)) { $ABg9n = array(intval($ABg9n)); } goto ikPjt; l1lci: } public static function get($OSU2M = null, $vkNI7 = null) { goto MmLwB; ftE8n: return isset($oGUcW[$OSU2M]) ? $oGUcW[$OSU2M] : $vkNI7; goto Bg60s; ewDOR: if (null === $OSU2M) { return $oGUcW; } goto ftE8n; MmLwB: $oGUcW = self::user(); goto ewDOR; Bg60s: } public static function nickname() { return MemberUtil::viewName(self::user()); } }