function validate_btcaddress($pubkey)
{
    if (is_valid_btcaddress($pubkey)) {
        return $pubkey;
    } else {
        return 'WRONG BITCOIN ADDRESS';
    }
}
     if ($password1 != $password2) {
         $errors[] = $lang_profile['Pass not match'];
     }
 }
 // ... and the e-mail address
 if (!defined('FORUM_EMAIL_FUNCTIONS_LOADED')) {
     require FORUM_ROOT . 'include/email.php';
 }
 if (!is_valid_email($email1)) {
     $errors[] = $lang_profile['Invalid e-mail'];
 }
 //... and the btc-address
 if (!defined('FORUM_BITCOIN_FUNCTIONS_LOADED')) {
     require FORUM_ROOT . 'include/bitcoin.php';
 }
 if (!is_valid_btcaddress($btcaddress)) {
     $errors[] = 'False bitcoin address';
 }
 #############
 if (!isset($_SESSION['req_buyer_account'])) {
     //... and the pub-key
     if (!defined('FORUM_PUBKEY_FUNCTIONS_LOADED')) {
         require FORUM_ROOT . 'include/pubkey.php';
     }
     if (!is_valid_pubkey($pubkey)) {
         $errors[] = 'False public key';
     }
     if ($_POST['buy_invitation'] == '0') {
         //... and the invite
         if (!defined('FORUM_BITCOIN_FUNCTIONS_LOADED')) {
             require FORUM_ROOT . 'include/invite.php';