username=$username;
$this->password=$password;
$this->usermail=$usermail;
error_reporting('E_ALL ^ E_NOTICE');
}
function register(){
return uc_user_register($this->username,md5($this->password),$this->usermail);
}
function get_user($userid='',$type=0){
return uc_user_get($userid,$type);
}
function checkename(){
$checkuser =uc_check_username($this->username);
if($checkuser==1){
return 1;
}elseif($checkuser==-1){
return -1;
}else{
return -3;
}
}
function checkemail(){
$emailcount=uc_check_email($this->usermail);
if($emailcount>0){
return 1;
}elseif($emailcount==-3){
return -4;
}else{
return -6;
}
}
function logout(){
return uc_user_synlogout();
}
function user_login(){
$userarr =uc_user_get($this->username,0);
return uc_user_check($userarr['uid'],md5(UC_KEY.md5($this->password)));
}
function login($userid){
$user_login=uc_user_login($userid,md5($this->password),1);
return $user_login['synlogin'];
}
function getavatar($userid,$type){
$userarr =uc_user_get($userid,1);
$usericonarr=explode('|',$userarr['avatar']);
if($usericonarr[0]=='none.gif' || empty($usericonarr[0]) || $usericonarr[1]==1){
if($type){
$avatar='';
}else{
$avatar='
';
}
}else{
if($usericonarr[1]==2){
$avatar='
';
}else{
if($type){
$avatar='
';
}else{
$avatar='
';
}
}
}
return $avatar;
}
function avatar($userid){
return '