This topic is locked

custom password encryption

12/19/2012 9:05:07 AM
PHPRunner General questions
B
BrownCHiLD author

Hi guys,
I would like to have a login page but using my existing user table, w/ my own way of encryption, not phprunner .. it's a mix of md5 and some of my own thing.. so it's pretty custom type..
how do I make phprunner understand / use my way of checking for password?
also, if this means i have to hack into the phprunner code, nevermind that.. i would like to however be able to atleast attach a php code on every phprunner page.. ill do my own login/session check from there, independent of phprunner..
please help

R
rgfischerjr 12/20/2012

You should be able to take the password as entered by the user, encrypt it by using your method, set the encrypted result to a string value and either store the string (if it's a new password) or compare the value to the stored value (in the case of a normal login). I use md5 and it works with no issues. The encryption code snippet goes in the login.php script. Not much hacking involved if you already have the encryption code worked out.

Admin 12/20/2012

You need to implement a set of events in order to use your custom encryption scheme.
BeforeLogin - this is where you validate username/password. After successful password validation you need to populate PHPRunner session variables related to security and redirect user to one of your application pages.
See examples of what you need to do after successful login in Add Joomla sessions support to PHPRunner application section at http://www.asprunner.com/forums/topic/13251-phprunner-and-joomla/
BeforeRegister/BeforeChangePassword - this is where you encrypt the passwords.