Can I remove password encryption

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Locked
drewhart71

Can I remove password encryption

Post by drewhart71 »

I am registering users in another application and sending the user information directly to the user database via php.  Obviously, the password doesn't encrypt that way.  Is there a way to turn off the encryption and/or does someone know the php/script or whatever I would need to run a straight forward numerical password to make it encrypted before writing it to the database.  Many thanks in advance,

Drew
thoms
Forum Members
Forum Members
Posts: 84
Joined: Tue Dec 25, 2007 5:56 pm

Re: Can I remove password encryption

Post by thoms »

I would definitely not remove the password encryption.

CSMms uses standard encryption via md5:

http://de.php.net/manual/en/function.md5.php


You can easily find that it in the admin/adduser.php:

Code: Select all

#$query = "INSERT INTO ".cms_db_prefix()."users (user_id, username, password, active, create_date, modified_date) VALUES ($new_user_id, ".$db->qstr($user).", ".$db->qstr(md5($password)).", $active, '".$db->DBTimeStamp(time())."', '".$db->DBTimeStamp(time())."')";
or the lib/classes/class.user.inc.php:

Code: Select all

	function SetPassword($password)
	{
		$this->password = md5($password);
	}
So all you need is to md5 your passwords before saving it to the database.

Thomas
Locked

Return to “[locked] Installation, Setup and Upgrade”