Linchpin311 Thu Mar 19, 2009 7:01 pm
this is kinda coming off the top of my head, i didnt test it or anything (but it sounds like a good idea when i say it out loud!), but maybe in register.php remove the username part so you are just left with email and password. you should probably create a hidden field called user in register.php just to fool process.php and session.php
then moving into session.php check out the function
register. i would remove that whole
/* Username error checking */ section cause we now have no username to check. then close to the bottom of that function you should see a line that says
- Code:
/* No errors, add the new account to the */
else{
if($database->addNewUser($subuser, md5($subpass), $subemail)){
if(EMAIL_WELCOME){
$mailer->sendWelcome($subuser,$subemail,$subpass);
}
return 0; //New user added succesfully
}else{
return 2; //Registration attempt failed
}
}
i would edit that so it says
- Code:
/* No errors, add the new account to the */
else{
if($database->addNewUser($subemail, md5($subpass), $subemail)){
if(EMAIL_WELCOME){
$mailer->sendWelcome($subemail,$subemail,$subpass);
}
return 0; //New user added succesfully
}else{
return 2; //Registration attempt failed
}
}
this will enter the users email address in the user and email fields of the database. it will also send out a properly formatted welcome email if you turned that feature on.
now if i havent forgotten anything (which is totally possible, stop me if something doesnt sound right), you should be able to log with your username... which is also your email address!
i will test this out later tonight or tomorrow, but in the mean time if you want to check it out let me know what this does for you.