lang( 'profile_nickname_tooshort'))); } elseif ($usernamelen > 30) { showTips(array('error'=>lang( 'profile_nickname_toolong'))); } require_once libfile('function/user'); $ucresult = uc_user_checkname($username); if ($ucresult == -1) { showTips(array('error'=>lang( 'profile_nickname_illegal'))); } elseif ($ucresult == -2) { showTips(array('error'=>lang( 'profile_nickname_protect'))); } elseif ($ucresult == -3) { showTips(array('error'=>lang( 'register_check_found'))); } $censorexp = '/^(' . str_replace(array('\\*', "\r\n", ' '), array('.*', '|', ''), preg_quote(($_G['setting']['censoruser'] = trim($_G['setting']['censoruser'])), '/')) . ')$/i'; if ($_G['setting']['censoruser'] && @preg_match($censorexp, $username)) { showTips(array('error'=>lang( 'profile_nickname_protect'))); } } elseif ($_GET['action'] == 'checkemail') { require_once libfile('function/user'); checkemail($_GET['email']); } elseif ($_GET['action'] == 'checkphone') { $phone=htmlspecialchars($_GET['phone']); if(!isphone($phone)){ showTips(array('error'=>lang( 'user_phone_illegal'))); } if(C::t('user')->fetch_by_phone($phone,1)){ showTips(array('error'=>lang( 'user_phone_registered'))); } } elseif ($_GET['action'] == 'checkuserexists') { if (C::t('user') -> fetch_by_username(trim($_GET['username']))) { showmessage('', '', array(), array('msgtype' => 3)); } else { showmessage('username_nonexistence', '', array(), array('msgtype' => 3)); } }