<?php
!defined('IN_ONEZ') && exit('Access Denied');
onez('user')->set('usertype','member');
#验证登录账号
function _login_callback($username,$password,$password_md5){
  return onez('user')->_login_callback($username,$password,$password_md5);
}
if(file_exists(dirname(__FILE__).'/config.php')){
  include(dirname(__FILE__).'/config.php');
}
$login=onez('login')->init('chat_group');$G['href_logout']=onez()->href('/exit.php');$G['href_logout']=onez()->href('/exit.php');
$G['userid']=(int)$login['id'];
$G['loginstr']=$login['extra'];

$G['user']=$G['this']->data()->open('member')->one("id='$G[userid]'");
$G['nickname']=$G['user']['realname'];
!$G['nickname'] && $G['nickname']=$G['user']['nickname'];
!$G['nickname'] && $G['nickname']=$G['user']['username'];
$G['avatar']=onez('user')->avatar($G['userid']);
