<?php
/**
 * Created by PhpStorm.
 * User: stanley-king
 * Date: 2017/4/28
 * Time: 上午10:45
 */

namespace login;

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

    public function ismember()
    {
        $mod_member = Model('member');
        $minfo = $mod_member->getMemberInfo(['member_wxopenid' =>$this->mOpenID],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)
    {

    }
}