<?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($WeAjq, \Closure $fea_j) { goto Ad2xy; WlQPN: View::share('_memberUser', $QqUVI); goto BUZ42; BMPW6: $QqUVI = null; goto ouZ9b; BUZ42: return $fea_j($WeAjq); goto XJ0qv; vAjGh: if ($shbIl && !$QqUVI) { $shbIl = 0; Session::forget('memberUserId'); } goto wb1Vq; ouZ9b: if ($shbIl) { goto SdUvB; c64YX: if ($QqUVI) { switch ($QqUVI['status']) { case MemberStatus::FORBIDDEN: $QqUVI = null; break; } } goto VM3l0; SdUvB: $QqUVI = MemberUtil::get($shbIl); goto xoDOe; xoDOe: MemberUtil::processDefault($QqUVI); goto c64YX; VM3l0: } goto vAjGh; JD4ym: if (empty($shbIl)) { if (is_subclass_of($xyZf_, MemberLoginCheck::class)) { if (property_exists($xyZf_, 'memberLoginCheckIgnores') && is_array($xyZf_::$memberLoginCheckIgnores) && in_array($O2USQ, $xyZf_::$memberLoginCheckIgnores)) { } else { return Response::send(-1, null, null, modstart_web_url('login') . '?redirect=' . urlencode(Request::currentPageUrl())); } } } goto oP3Xe; YVbUS: $shbIl = intval(Session::get('memberUserId', 0)); goto BMPW6; Qqms9: Session::flash('_memberUser', $QqUVI); goto WlQPN; oP3Xe: Session::put('memberUserId', $shbIl); goto Qqms9; wb1Vq: View::share('_memberUserId', $shbIl); goto JD4ym; Ad2xy: list($xyZf_, $O2USQ) = Request::getControllerAction(); goto YVbUS; XJ0qv: } }