I don't allow multiple addresses either. I modified this sub in User.pm in 1.18
I also changed the templates for lost_password page remind_password.eml template.
remind_password.eml template:
Here is the <%site_title%> login reminder you requested:
Username: <%user_username%>
Password: <%user_password%>
Password hints:
Make sure you type your username and password correctly. All usernames and
passwords are (CaSe SeNsitIvE).
The forum can be found at:
<%cgi_root_url%>/gforum.cgi?do=login;user_username=<%GT::CGI::escape($user_username)%>
Here is sample page:
http://www.ptcruiserclub.org/...cgi?do=lost_password;
$COMPILE{lost_password} = __LINE__ . <<'END_OF_SUB';
sub lost_password {
shift;
my ($do, $func) = @_;
my $page = $func->{page};
my $email = lc ($IN->param('user_email'));
my $user;
(!length $email) and return($page->{enter_username});
if ($email and $email =~ /.@(?:[a-zA-Z0-9][a-zA-Z0-9-]*\.)+[a-zA-Z0-9][a-zA-Z0-9-]*$/ ) {
my $User = $DB->table('User');
if ($user = $User->select({ user_email => $email })->fetchrow_hashref) {
}
else {
return($page->{enter_username} => { error => GForum::language('USER_WRONG_EMAIL', $email) });
}
}
else {
return($page->{enter_username} => { error => GForum::language('USER_EMAIL_BAD_SYNTAX', $email) });
}
# send the reminder email
_send_email("remind_password.eml", $user);
return($page->{success}, $user);
}
END_OF_SUB
----------
Michael J. Challis - CRUZN8R - PT Cruiser Club - http://www.ptcruiserclub.org
http://www.ptcruiserclub.org/forum
I also changed the templates for lost_password page remind_password.eml template.
remind_password.eml template:
Code:
Here is the <%site_title%> login reminder you requested:
Username: <%user_username%>
Password: <%user_password%>
Password hints:
Make sure you type your username and password correctly. All usernames and
passwords are (CaSe SeNsitIvE).
The forum can be found at:
<%cgi_root_url%>/gforum.cgi?do=login;user_username=<%GT::CGI::escape($user_username)%>
Here is sample page:
http://www.ptcruiserclub.org/...cgi?do=lost_password;
Code:
# CRUZN8R modified to just send the password reminder instead of temporary password BS $COMPILE{lost_password} = __LINE__ . <<'END_OF_SUB';
sub lost_password {
shift;
my ($do, $func) = @_;
my $page = $func->{page};
my $email = lc ($IN->param('user_email'));
my $user;
(!length $email) and return($page->{enter_username});
if ($email and $email =~ /.@(?:[a-zA-Z0-9][a-zA-Z0-9-]*\.)+[a-zA-Z0-9][a-zA-Z0-9-]*$/ ) {
my $User = $DB->table('User');
if ($user = $User->select({ user_email => $email })->fetchrow_hashref) {
}
else {
return($page->{enter_username} => { error => GForum::language('USER_WRONG_EMAIL', $email) });
}
}
else {
return($page->{enter_username} => { error => GForum::language('USER_EMAIL_BAD_SYNTAX', $email) });
}
# send the reminder email
_send_email("remind_password.eml", $user);
return($page->{success}, $user);
}
END_OF_SUB
----------
Michael J. Challis - CRUZN8R - PT Cruiser Club - http://www.ptcruiserclub.org
http://www.ptcruiserclub.org/forum