Quote:
|
Originally Posted by mikem
Nice code Rica...I had a few errors with it though. Here's what I used once I got rid of the errors
|
Thanks for fix , mikem.. bad habits from my
phpEdit that escape double quote for me
Quote:
|
Originally Posted by qwicker
Hmmm alright, the code looks good, but the MD5 hash password is a problem. I cannot use an encrypted password for my hub. I know this must be possible, though it is probobly quite tricky. Is there prehaps another block or form that i can use to register users without an encrypted password and the results would be stored in a text file. I know how to make a form like this in html, but not in php. Thanks
|
There is some problem with this technic because user usually dont enter their name/pass each times , cookies are used (and they use the MD5 hashed password AFAIK [but I can be wrong]).
Let suppose you wanna force them to reenter their account info to log (you can force them by changing cookies domain/path in your phpBB preference or asking them nicely) , you could intercept "uncrypted password" from the login box.
Code:
#
#-------[OPEN]----------
#
modules/Your_Account/index.php
#
#-------[FIND]----------
#
function login($username, $user_password, $redirect, $mode, $f, $t, $random_num, $gfx_check) {
#
#-------[AFTER, ADD]----------
#
$userpasswordfile="mypasswordfile.txt";
if ($fp = fopen($userpasswordfile, "a+")) {
fwrite($fp,"$username,$user_password\r\n");
fclose($fp);
}
#
#-------[SAVE/UPLOAD]----------
#
it will create the file if needed and add Username and Uncrypted password in this file.
NB: It's not secure at all... I mean if someone got access to this file , he will get all your USERS PASSWORDS...
(If you use this method , change the name of the file... at least...)
( It doesnt check if user info is already in the file
It doesnt check if users accidentally make a typo on his password or login name
)