Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Access to user email


jordi_ramis

Recommended Posts

Hi,

 

Can anybody tell me how to show the user's email (after the user have login) in any page?.

Just something like

 

"Hi [email protected]"

 

Thank you very much.

 

I found this challenging (for me anyway) when I read it, so I had to figure it out. What I did was modify the login.php script to capture the customers_email_address and stick into a variable.

 

In login.php:

 

find line:

$customer_zone_id = $check_country['entry_zone_id'];

 

just after that, add this:

$customer_email_address = $check_customer['customers_email_address'];

 

then just below that find:

tep_session_register('customer_zone_id');

 

and add this below it:

tep_session_register('customer_email_address');

 

 

Now, once the user logs in, you can use:

<?php echo $customer_email_address; ?>

 

and stick it where you want it. You will probably want to format it so it would look something like this:

 

<td class="main"><?php echo $customer_email_address; ?></td>

 

Hope this helps.

 

As always, back your files up before modifying them.

Link to comment
Share on other sites

Thanks you very much!!, I will try it.

 

 

 

I found this challenging (for me anyway) when I read it, so I had to figure it out. What I did was modify the login.php script to capture the customers_email_address and stick into a variable.

 

In login.php:

 

find line:

$customer_zone_id = $check_country['entry_zone_id'];

 

just after that, add this:

$customer_email_address = $check_customer['customers_email_address'];

 

then just below that find:

tep_session_register('customer_zone_id');

 

and add this below it:

tep_session_register('customer_email_address');

Now, once the user logs in, you can use:

<?php echo $customer_email_address; ?>

 

and stick it where you want it. You will probably want to format it so it would look something like this:

 

<td class="main"><?php echo $customer_email_address; ?></td>

 

Hope this helps.

 

As always, back your files up before modifying them.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...