PDA

View Full Version : Wrote a "forgot password" mod (PHP version)


thomaz
12-31-2004, 01:05 PM
FORGOT PASSWORD FEATURE FOR ARTICLELIVE2005 (PHP)

1) class.author.php
location: your-article-live-directory/includes/classes/
description: added new functions, you can overwrite your existing one (at your own risk!)
notes: take a look at the function ProcessForgotPass() - this function sends an email to the user, you would probably like to customise the email message body and email subject there

2) front_language.ini
location: your-article-live-directory/includes/language
description: this just ads 2 language variables for display in the breadcrumbs - better not to overwrite your existing one -
just add these 2 lines under the ; [Authors] section

authAuthorForgotPass = "Forgot Password"
authAuthorForgotPassSuccess = "Password Sent"

3) Authors.html
location: your-article-live-directory/templates/your-template-directory
description: only to add the additional panels - better not to overwrite your existing one, since everyone uses a different template
just add the following panels

%%Panel.AuthorForgotPassPanel%%
%%Panel.AuthorForgotPassSuccessPanel%%
%%Panel.AuthorForgotPassErrorPanel%%

I've attached my Authors.html for you to take a look

4) AuthorLogInPanel.html
location: your-article-live-directory/templates/your-template-directory/panels
description: only to add the link to the forgot password feature - better not to overwrite your existing one
just add the following line where you see fit

<a href="%%GLOBAL_siteURL%%/authors/forgotpass">Forgot Password?</a>

5) Upload the following .php files to http://your-article-live-directory/templates/your-template-directory/panels
I assume these files can be uploaded as is without any modification

a) AuthorForgotPassErrorPanel.php
b) AuthorForgotPassPanel.php
c) AuthorForgotPassSuccessPanel.php


6) Create the following .html files and upload to http://your-article-live-directory/templates/your-template-directory/panels

a) AuthorForgotPassErrorPanel.html
b) AuthorForgotPassPanel.html
c) AuthorForgotPassSuccessPanel.html

Depending if you have made heavy modifications, these files can be uploaded as is, because they are simply created to display messages; only the AuthorForgotPassPanel.html may need some modifications depending if you have a highly customized site.

NOTE 1:
All the files that I recommended not overwriting your existing ones are here for you to have an idea of what to do

NOTE 2:
Since the ArticleLive system doesn't complain of multiple accounts having the same password, running the forgot password feature will reset ALL the multiple accounts to one password

NOTE 3:
back up all your old files

thanks,
tom

Perkster
06-25-2005, 01:04 AM
NOTE 2:
Since the ArticleLive system doesn't complain of multiple accounts having the same password, running the forgot password feature will reset ALL the multiple accounts to one password

NOTE 3:
back up all your old files

thanks,
tom

I installed this mod. I tested it out and it worked fine. But one thing I did notice was if you put in a different email address let's say the admin email address it would change the password of the administrator... So I guess it is possible to have a author who knows the admin email address to change his/her password since this mod recreates the password for whatever email address is on the system?? But one good thing. At least the password is emailed to the admin if this happens.

-mike