Kurde nie ma

Ogólnie kodu za dużo nie ma:
Tutaj układa nowe hasełka tak:
function tep_create_random_value($length, $type = 'mixed') {
if ( ($type != 'mixed') && ($type != 'chars') && ($type != 'digits')) return false;
$rand_value = '';
while (strlen($rand_value)<$length) { if ($type == 'digits') {
$char = tep_rand(0,9);
} else {
$char = chr(tep_rand(0,255));
}
if ($type == 'mixed') {
if (eregi('^[a-z0-9]$', $char)) $rand_value .= $char; } elseif ($type == 'chars') {
if (eregi('^[a-z]$', $char)) $rand_value .= $char; } elseif ($type == 'digits') {
if (ereg('^[0-9]$', $char)) $rand_value .= $char; }
}
return $rand_value;
}
Dalej treść:
define('EMAIL_PASSWORD_REMINDER_SUBJECT', 'bleble nie wazny tekst');
I pozostała najważniejsza część:
$check_customer_query = tep_db_query("select customers_firstname, customers_lastname, customers_password, customers_id, customers_email_address from " . TABLE_CUSTOMERS);
$check_customer = tep_db_fetch_array($check_customer_query);
// Crypted password mods - create a new password, update the database and mail it to them
$newpass = tep_create_random_value(ENTRY_PASSWORD_MIN_LENGTH);
$crypted_password = tep_encrypt_password($newpass);
tep_db_query("update " . TABLE_CUSTOMERS . " set customers_password = '" . $crypted_password . "' where customers_id = '" . $check_customer['customers_id'] . "'");
tep_mail
($check_customer['customers_firstname'] . " " . $check_customer['customers_lastname'], $check_customer['customers_email_address'], EMAIL_PASSWORD_REMINDER_SUBJECT
, nl2br(sprintf(EMAIL_PASSWORD_REMINDER_BODY
, $newpass)), STORE_OWNER
, STORE_OWNER_EMAIL_ADDRESS
); tep_redirect
(tep_href_link
(FILENAME_CUSTOMERS
, 'info_message=' . urlencode(TEXT_PASSWORD_SENT_TO_CUST
)));
No i wysyła mi do pierwszego jakieś pętli hamującej wysłania do wszystkich klientów zmianę hasła nie widzę