<?php

/**
 * Created by PhpStorm.
 * User: stanley-king
 * Date: 2017/4/26
 * Time: 下午10:08
 */

namespace login;

class unionid_log extends ILogin
{
    private $mUnionID;
    public function __construct($user_info)
    {
        $this->mUnionID = $user_info;
    }

    public function ismember()
    {
        $mod_member = Model('member');
        $minfo = $mod_member->getMemberInfo(['member_wxunionid' =>$this->mUnionID],ILogin::fields,true);
        if(empty($minfo)) {
            return false;
        }
        else {
            $this->mMemberId = intval($minfo['member_id']);
            $this->mMemberInfo = $minfo;
            return true;
        }
    }
    public function register($passwd,$user_info,$relay_id = 0)
    {

    }
}