Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Jan 2001
Posts: 2
Orc
Offline
Junior Member
Junior Member
Offline
Joined: Jan 2001
Posts: 2
Most forums probably don't have this problem, but at my UBB forums, it is common for users to register multiple times and post under different usernames. Often they use the same email address for these multiple usernames. Problem is, if they forget one of their passwords, the UBB auto-emailer doesn't work - it won't send out your username and password to your email address if you have more than one username associated with that email address.

I don't know why they coded it this way. But for my version 5.47d forums, the change was really easy to get it to work. The result is that if you do the forget password thing, it will email you all your usernames and passwords (each in a separate email). Here is what I did.

First make a backup of Ubbmisc.cgi
Then open Ubbmisc.cgi and find the PWRequest subroutine:

sub PWRequest {
.
.
.
} #end PWRequest sr


Replace that entire subroutine with the following:

sub PWRequest {
# Find the right registration
&GetMemberListArray;
&GetEmails; # returns @EmailList array
$Found = "";
$Foundonce = "";


#lowercase the email input
$sendto = lc($in{'sendto'});
$CountIt = 0;
foreach $emailline(@EmailList) {
($theemail, $thenumber) = split(/??/, $emailline);
$theemail = lc("$theemail");

if ($theemail eq "$sendto") {
chomp($thenumber);
@thisprofile = &OpenProfile("$thenumber.cgi");
$YourName = "$thisprofile[0]";
$YourPassword = "$thisprofile[1]";
$CountIt = $CountIt + 1;
$Foundonce = "yes";
$Found = "yes";

if ($Found eq "yes") {

#Send the Email

$from = "$BBEmail";
$subject = "Your UserName and Password - $BBName";
$message = ("Here is the registration information you requested for $BBName. nn Your UserName is: $YourNamen Your Password is: $YourPassword nn This bulletin board is located at $CGIURL/Ultimate.cgi nnThank you!");
if ($SMTPEmail eq "On") {
&SendEmail;
} else {
&send_mail("$BBEmail", "$sendto", "$subject", "$message");
}

}


$Found = "";


}
}

if ($Foundonce eq "yes") {

#Notify user that email has been sent
&Forward("$CGIURL/Ultimate.cgi?action=intro&BypassCookie=true", "Your username and password for this bulletin board have just been emailed to you!

You are now being automatically returned to the main page.");
} else {
&StandardHTML("We have no one registered with the email address you listed. Use your back button to try again.");
}
} #end PWRequest sr

Sponsored Links

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)