getLoginConfig(); if ($type == MemberLoginTypeDict::USERNAME) { $is_username = $config[ 'is_username' ]; //未开启账号密码登录注册 if ($is_username != 1) throw new AuthException('MEMBER_USERNAME_LOGIN_NOT_OPEN'); } elseif ($type == MemberLoginTypeDict::MOBILE) { $is_mobile = $config[ 'is_mobile' ]; $is_bind_mobile = $config[ 'is_bind_mobile' ]; //未开启手机号登录注册 if ($is_mobile != 1 && $is_bind_mobile != 1) throw new AuthException('MOBILE_LOGIN_UNOPENED'); } return true; } }