Utilizamos cookies propias y de terceros para mejorar la experiencia de navegación, y ofrecer contenidos y publicidad de interés.
Al continuar con la navegación entendemos que se acepta nuestra política de cookies.
Iniciar sesión Cerrar
Correo:
Contraseña:
Entrar
Recordar sesión en este navegador
Iniciar sesiónIniciar sesiónCrear cuentaCrear cuenta

e-comerce - Modificar mail usuario

  Imprimir  
Vista:
Me gusta: Está pregunta es útil y esta clara
0
No me gusta: Está pregunta no esta clara o no es útil
 
Asunto:

Modificar mail usuario

Autor:julio ramos (1 intervención)
Fecha:25/07/2009 02:30:51
Saludos, Este codigo que hay mas abajo sirve para crear un usuario dentro de un sistema oscommerce.
Lo que necesito es poder modificar el email que pone el usuario, pero cuando el mail sea enviado.
quiero poner algun atributo al email con el objetivo de que el usuario no pueda acceder sin ser autorizado. para el poder acceder entonces yo manualmente le quito el atributo al mail.
Esto es un ejemplo de un update pero para otra cosa.


tep_db_query("update " . TABLE_CUSTOMERS . " set customers_default_address_id = '" . (int)$address_id . "' where customers_id = '" . (int)$customer_id . "'");

Aquí dejo el código el archivo create_account.php.
solo hay una parte del codigo

<?php
require('includes/application_top.php');
require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CREATE_ACCOUNT);

if (ACCOUNT_GENDER == 'true') {
if ( ($gender != 'm') && ($gender != 'f') ) {
$error = true;

$messageStack->add('create_account', ENTRY_GENDER_ERROR);
}
}

if (strlen($firstname) < ENTRY_FIRST_NAME_MIN_LENGTH) {
$error = true;

$messageStack->add('create_account', ENTRY_FIRST_NAME_ERROR);
}

$messageStack->add('create_account', ENTRY_COUNTRY_ERROR);
}

$messageStack->add('create_account', ENTRY_STATE_ERROR_SELECT);
}
} else {
if (strlen($state) < ENTRY_STATE_MIN_LENGTH) {
$error = true;

$messageStack->add('create_account', ENTRY_STATE_ERROR);
}
}
}

if (strlen($telephone) < ENTRY_TELEPHONE_MIN_LENGTH) {
$error = true;

$messageStack->add('create_account', ENTRY_TELEPHONE_NUMBER_ERROR);
}

if (strlen($password) < ENTRY_PASSWORD_MIN_LENGTH) {
$error = true;

$messageStack->add('create_account', ENTRY_PASSWORD_ERROR);
} elseif ($password != $confirmation) {
$error = true;

$messageStack->add('create_account', ENTRY_PASSWORD_ERROR_NOT_MATCHING);
}

if ($error == false) {
$sql_data_array = array('customers_firstname' => $firstname,
'customers_lastname' => $lastname,
'customers_email_address' => $email_address,
'customers_telephone' => $telephone,
'customers_fax' => $fax,
'customers_newsletter' => $newsletter,
'customers_password' => tep_encrypt_password($password));

if (ACCOUNT_GENDER == 'true') $sql_data_array['customers_gender'] = $gender;
if (ACCOUNT_DOB == 'true') $sql_data_array['customers_dob'] = tep_date_raw($dob);

tep_db_perform(TABLE_CUSTOMERS, $sql_data_array);

$customer_id = tep_db_insert_id();

$sql_data_array = array('customers_id' => $customer_id,
'entry_firstname' => $firstname,
'entry_lastname' => $lastname,
'entry_street_address' => $street_address,
'entry_postcode' => $postcode,
'entry_city' => $city,
'entry_country_id' => $country);

if (ACCOUNT_GENDER == 'true') $sql_data_array['entry_gender'] = $gender;
if (ACCOUNT_COMPANY == 'true') $sql_data_array['entry_company'] = $company;
if (ACCOUNT_SUBURB == 'true') $sql_data_array['entry_suburb'] = $suburb;
if (ACCOUNT_STATE == 'true') {
if ($zone_id > 0) {
$sql_data_array['entry_zone_id'] = $zone_id;
$sql_data_array['entry_state'] = '';
} else {
$sql_data_array['entry_zone_id'] = '0';
$sql_data_array['entry_state'] = $state;
}
}

tep_db_perform(TABLE_ADDRESS_BOOK, $sql_data_array);

$address_id = tep_db_insert_id();

tep_db_query("update " . TABLE_CUSTOMERS . " set customers_default_address_id = '" . (int)$address_id . "' where customers_id = '" . (int)$customer_id . "'");

tep_db_query("insert into " . TABLE_CUSTOMERS_INFO . " (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created) values ('" . (int)$customer_id . "', '0', now())");

if (SESSION_RECREATE == 'True') {
tep_session_recreate();
}



$email_text .= EMAIL_WELCOME . EMAIL_TEXT . EMAIL_CONTACT . EMAIL_WARNING;
tep_mail($name, $email_address, EMAIL_SUBJECT, $email_text, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

tep_redirect(tep_href_link(FILENAME_CREATE_ACCOUNT_SUCCESS, '', 'SSL'));
}
}

?>
}
?>
<tr>
<td class="main"><?php echo ENTRY_FIRST_NAME; ?></td>
<td class="main"><?php echo tep_draw_input_field('firstname') . '&' . (tep_not_null(ENTRY_FIRST_NAME_TEXT) ? '<span class="inputRequirement">' . ENTRY_FIRST_NAME_TEXT . '</span>': ''); ?></td>
</tr>
<tr>
<td class="main"><?php echo ENTRY_LAST_NAME; ?></td>
<td class="main"><?php echo tep_draw_input_field('lastname') . '&' . (tep_not_null(ENTRY_LAST_NAME_TEXT) ? '<span class="inputRequirement">' . ENTRY_LAST_NAME_TEXT . '</span>': ''); ?></td>
</tr>
<?php
if (ACCOUNT_DOB == 'true') {
?>
<tr>
<td class="main"><?php echo ENTRY_DATE_OF_BIRTH; ?></td>
<td class="main"><?php echo tep_draw_input_field('dob') . '&' . (tep_not_null(ENTRY_DATE_OF_BIRTH_TEXT) ? '<span class="inputRequirement">' . ENTRY_DATE_OF_BIRTH_TEXT . '</span>': ''); ?></td>
</tr>
<?php
}
?>
<tr>
<td class="main"><?php echo ENTRY_EMAIL_ADDRESS; ?></td>
<td class="main"><?php echo tep_draw_input_field('email_address') . '&' . (tep_not_null(ENTRY_EMAIL_ADDRESS_TEXT) ? '<span class="inputRequirement">' . ENTRY_EMAIL_ADDRESS_TEXT . '</span>': ''); ?></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<?php
if (ACCOUNT_COMPANY == 'true') {
?>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<tr>
<td class="main"><?php echo CATEGORY_COMPANY; ?></td>
</tr>
<tr>
<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
<tr class="infoBoxContents">
<td><table border="0" cellspacing="2" cellpadding="2">
<tr>
<td class="main"><?php echo ENTRY_COMPANY; ?></td>
<td class="main"><?php echo tep_draw_input_field('company') . '&' . (tep_not_null(ENTRY_COMPANY_TEXT) ? '<span class="inputRequirement">' . ENTRY_COMPANY_TEXT . '</span>': ''); ?></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<?php
}
?>
<</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<tr>
<td class="main"><?php echo CATEGORY_PASSWORD; ?></td>
</tr>
<tr>
<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
<tr class="infoBoxContents">
<td><table border="0" cellspacing="2" cellpadding="2">
<tr>
<td class="main"><?php echo ENTRY_PASSWORD; ?></td>
<td class="main"><?php echo tep_draw_password_field('password') . '&' . (tep_not_null(ENTRY_PASSWORD_TEXT) ? '<span class="inputRequirement">' . ENTRY_PASSWORD_TEXT . '</span>': ''); ?></td>
</tr>
<tr>
<td class="main"><?php echo ENTRY_PASSWORD_CONFIRMATION; ?></td>
<td class="main"><?php echo tep_draw_password_field('confirmation') . '&' . (tep_not_null(ENTRY_PASSWORD_CONFIRMATION_TEXT) ? '<span class="inputRequirement">' . ENTRY_PASSWORD_CONFIRMATION_TEXT . '</span>': ''); ?></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<tr>
<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
<tr class="infoBoxContents">
<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
<td><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></td>
<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></form></td>
<?php echo mws_footer_main (''); ?>
<!-- body_text_eof //-->
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->

<!-- right_navigation_eof //-->
</table></td>
</tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php include(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->


</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
Responder