Previous Thread
Next Thread
Print Thread
Rate Thread
#37174 03/31/2000 12:31 PM
Joined: Jan 2000
Posts: 56
Member
Member
Offline
Joined: Jan 2000
Posts: 56
Some of the people that sign up on our board know that they can click on the "Forgot your password?" link and have their password emailed to them.

We check all registrations to our board as we require the use of real names instead of handles. We do not send them a password until we check out the username they sign up with.

Some people know that after they register they can go to the link to have their password emailed to them even though they might not have their username accepted.

So to get around this I have added the following code:

In Ubbmisc.cgi

Look for:

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

#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;
$Found = "yes";
}
}

if ($CountIt >= 2) {
&StandardHTML("
Sorry, we cannot process your request because more than one person is using that email address.
");
exit;
}

and replace it with:

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

#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]";
$MessageCount = "$thisprofile[7]";
$CountIt = $CountIt + 1;
$Found = "yes";
}
}

if ($CountIt >= 2) {
&StandardHTML("
Sorry, we cannot process your request because more than one person is using that email address.
");
exit;
}

if ($MessageCount <=0) {
&StandardHTML("
Sorry, we cannot process your request because you have not posted a message yet!
");
exit;
}


The italisized lines being the ones to add to the original code.

Parker

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,575
Posts293,932
Members13,824
Most Online6,139
Sep 21st, 2024
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,835
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-2025 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.1
(Snapshot build 20240918)