I use MySql, not sure if that has anything to do with this code. What error do you get?
I am using clear text passwords. Some people use encrypted. This might only work for clear text passwords as coded.
For this mod, I installed the code in my post above and modified the lost_password_enter_username.html to input the e-mail instead of username:
10c10
< your password. It requires you to enter your username.
---
> your password. It requires you to enter your email.
36a37,39
> <%if error%>
> <%body_font%><font color=red><%error%><%/body_font%> <%body_font%>
> <a href="<%cgi_root_url%>/gforum.cgi?do=user_signup;">Click here if you need to register</a>
> <br><br><%/body_font%>
> <%endif%>
47,50c50
< If you have lost your password, <%site_title%> can generate a new temporary
< password for you to log in with. Note that after logging in the temporary
< password will be lost so you should change your password immediately upon
< logging in with the temporary password. The temporary password will be sent
---
> If you have lost your password, <%site_title%> can sent it to you. Your password will be sent
58c58
< Enter your username:
---
> Enter your email address:
62c62
< <input class="button" type="text" name="user_username">
---
> <input class="button" type="text" name="user_email">
67c67
< <input class="submit" type="submit" value="Send temporary password">
---
> <input class="submit" type="submit" value="Send password">
Also added two language vars:
'USER_WRONG_EMAIL' => '%s does not match an e-mail in our forum registry. Perhaps you have not registered before, or this is not the e-mail you registered with.'
'USER_EMAIL_BAD_SYNTAX' => 'You did not enter a valid email format.',
Hope this helps. When you start making changes you kind of have to troubleshoot as you go. It is common to make a typo, once you see the error, then make the change to fix it. Some people won't want to dabble in the programming. I always backup the original file before I change it. I also have a developement server setup on my local network so I don't break my live server when testing something new.
----------
Michael J. Challis - CRUZN8R - PT Cruiser Club - http://www.ptcruiserclub.org
http://www.ptcruiserclub.org/forum
I am using clear text passwords. Some people use encrypted. This might only work for clear text passwords as coded.
For this mod, I installed the code in my post above and modified the lost_password_enter_username.html to input the e-mail instead of username:
Code:
10c10
< your password. It requires you to enter your username.
---
> your password. It requires you to enter your email.
36a37,39
> <%if error%>
> <%body_font%><font color=red><%error%><%/body_font%> <%body_font%>
> <a href="<%cgi_root_url%>/gforum.cgi?do=user_signup;">Click here if you need to register</a>
> <br><br><%/body_font%>
> <%endif%>
47,50c50
< If you have lost your password, <%site_title%> can generate a new temporary
< password for you to log in with. Note that after logging in the temporary
< password will be lost so you should change your password immediately upon
< logging in with the temporary password. The temporary password will be sent
---
> If you have lost your password, <%site_title%> can sent it to you. Your password will be sent
58c58
< Enter your username:
---
> Enter your email address:
62c62
< <input class="button" type="text" name="user_username">
---
> <input class="button" type="text" name="user_email">
67c67
< <input class="submit" type="submit" value="Send temporary password">
---
> <input class="submit" type="submit" value="Send password">
Also added two language vars:
'USER_WRONG_EMAIL' => '%s does not match an e-mail in our forum registry. Perhaps you have not registered before, or this is not the e-mail you registered with.'
'USER_EMAIL_BAD_SYNTAX' => 'You did not enter a valid email format.',
Hope this helps. When you start making changes you kind of have to troubleshoot as you go. It is common to make a typo, once you see the error, then make the change to fix it. Some people won't want to dabble in the programming. I always backup the original file before I change it. I also have a developement server setup on my local network so I don't break my live server when testing something new.
----------
Michael J. Challis - CRUZN8R - PT Cruiser Club - http://www.ptcruiserclub.org
http://www.ptcruiserclub.org/forum