Previous Thread
Next Thread
Print Thread
Hop To
Joined: Aug 2006
Posts: 583
old hand
old hand
Joined: Aug 2006
Posts: 583
I run version 2.6 of Photopost classifieds integrated with my Threads7. However, one issue I found is that they pull user info from the threads USER field. So, when someone clicks on Contact Seller on an ad, it pulls USER_REGISTRATION_EMAIL from the USER Table. This is fine as long as the person NEVER changes their email address after they register on your forum. SOLUTION: Until the folks at Photopost fix this, here is what you can do.

1. In the file Threads7.php (in the forums directory in your photopost classifieds install) Look for the function:

function get_userinfo( $authuser, $userid=0 )

Then find this query:

if ( $userid != 0 ) $query = "SELECT u.USER_ID,u.USER_DISPLAY_NAME,u.USER_REGISTRATION_EMAIL,u.USER_PASSWORD, u.USER_SESSION_ID,u.USER_LOGIN_NAME,p.USER_STYLE,p.USER_TIME_OFFSET,p.USER_TEMPORARY_PASSWORD
FROM {$Globals['dprefix']}USERS u LEFT JOIN {$Globals['dprefix']}USER_PROFILE p ON p.USER_ID=u.USER_ID
WHERE u.USER_ID=$userid";



Change u.USER_REGISTRATION_EMAIL to p.USER_REAL_EMAIL


Then also, find this query:

else {
$tuser = addslashes( $authuser );
$query = "SELECT u.USER_ID,u.USER_DISPLAY_NAME,u.USER_REGISTRATION_EMAIL,u.USER_PASSWORD,
u.USER_SESSION_ID,u.USER_LOGIN_NAME,p.USER_STYLE,p.USER_TIME_OFFSET,p.USER_TEMPORARY_PASSWORD FROM {$Globals['dprefix']}USERS u
LEFT JOIN {$Globals['dprefix']}USER_PROFILE p ON p.USER_ID=u.USER_ID
WHERE u.USER_LOGIN_NAME='$tuser'";
}


Again, change u.USER_REGISTRATION_EMAIL to p.USER_REAL_EMAIL

One last thing. Just below these queries, find:

$queryv = ppmysql_query($query,$db_link);
$results = mysql_fetch_array($queryv);

$username[0] = $results['USER_ID']; // userid
$username[1] = $results['USER_DISPLAY_NAME']; // username
$username[2] = $results['USER_REGISTRATION_EMAIL']; // set email


set $usernam[2] = $results['USER_REAL_EMAIL'];

That's it. Now, when a member clicks the Contact Seller link in an ad, two things will happen: First, their "real" email address will fill into the "From field" and then when they send their email it will go to the seller's current "REAL" email address and not the email they registered with (in case thay have changed it)

Hope you find this useful,

Basil

Joined: Jun 2006
Posts: 16,532
Likes: 150
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,532
Likes: 150
Lol that's just great.. thanks for the fix though wink


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Aug 2006
Posts: 583
old hand
old hand
Joined: Aug 2006
Posts: 583
My pleasure. I had asked about it on the PP forum, but I never got a good answer. I kept getting bounced emails from people trying to "contact seller" for members who had changed their email address. Luckily it was an easy fix.


Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
PHP 8 bug in membermanage.tmpl
by phoenix011235 - 09/08/2026 7:47 PM
Are any of these legitmate?
by Baldeagle - 09/06/2026 1:37 PM
After server reboot
by Morgan - 09/02/2026 8:27 AM
Email Settings
by Outdoorking - 05/13/2026 2:44 AM
Who's Online Now
0 members (), 206 guests, and 158 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Ride safe!
Ride safe!
by Morgan, December 7
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260527)