View Single Post
  #4  
Old 11-30-2012, 12:09 PM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: How to get email address of logged on user?

If we could do this from a page that had $userinfo assigned like the my account page, then this would be a snap.

It's not going to be that hard, but it is going to require some PHP and a database query. First, lets determine what php page you are working with. Can you provide a link to the page? What does it say in the address bar? Is it news.php?

If so then we are going to have to place some code in that php file, to query the DB and assign it to smarty. Open up news.php
and try adding this to the bottom:
Code:
if (!empty($logged_userid)) $smarty->assign('userinfo', func_userinfo($logged_userid, 'C'));

Add it right before:
Code:
func_display('customer/home.tpl', $smarty);

Be sure to make changes like this on your dev/test site first, and make backups if the original files, and note the change in your changelog.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote