<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Member\Middleware; use Illuminate\Support\Facades\Session; use Illuminate\Support\Facades\View; use ModStart\Core\Input\Request; use ModStart\Core\Input\Response; use Module\Member\Support\MemberLoginCheck; use Module\Member\Type\MemberStatus; use Module\Member\Util\MemberUtil; class WebAuthMiddleware { public function handle($wG6Gh, \Closure $IOfPr) { goto N2kq9; o29t3: $g3uu_ = null; goto H0xeI; ybyJq: View::share('_memberUser', $g3uu_); goto i0UCd; k2PO9: Session::flash('_memberUser', $g3uu_); goto ybyJq; mWW8F: $KJqKC = intval(Session::get('memberUserId', 0)); goto o29t3; kuUFg: Session::put('memberUserId', $KJqKC); goto k2PO9; Kdweg: if ($KJqKC && !$g3uu_) { $KJqKC = 0; Session::forget('memberUserId'); } goto rFz9i; rFz9i: View::share('_memberUserId', $KJqKC); goto GRA2w; N2kq9: list($pNl1h, $NhQtb) = Request::getControllerAction(); goto mWW8F; GRA2w: if (empty($KJqKC)) { if (is_subclass_of($pNl1h, MemberLoginCheck::class)) { if (property_exists($pNl1h, 'memberLoginCheckIgnores') && is_array($pNl1h::$memberLoginCheckIgnores) && in_array($NhQtb, $pNl1h::$memberLoginCheckIgnores)) { } else { return Response::send(-1, null, null, modstart_web_url('login') . '?redirect=' . urlencode(Request::currentPageUrl())); } } } goto kuUFg; H0xeI: if ($KJqKC) { goto AePJr; uZnB_: if ($g3uu_) { switch ($g3uu_['status']) { case MemberStatus::FORBIDDEN: $g3uu_ = null; break; } } goto AK8cY; lrEvT: MemberUtil::processDefault($g3uu_); goto uZnB_; AePJr: $g3uu_ = MemberUtil::get($KJqKC); goto lrEvT; AK8cY: } goto Kdweg; i0UCd: return $IOfPr($wG6Gh); goto kGHQn; kGHQn: } }