<?php

// Create the receive announcement custom field for all customers.
$query = "SELECT id FROM customuserfields WHERE type=16";
$result = mysql_query($query) or die("ERROR in query: $query");
list($fieldId) = mysql_fetch_row($result);

$query = "SELECT id FROM users";
$result = mysql_query($query) or die("ERROR in query: $query");
while (list($userId) = mysql_fetch_row($result)) {
    $insert = "INSERT INTO user_customuserfields VALUES('$userId','$fieldId','1')";
    mysql_query($insert) or die("ERROR in query: $insert");
}

?>