Hi,
I want to make an other sign up page which is linked to the social engine database, but when i MD5 the password and store it in the se_users table, the user can't login, i believe that social engine have another encryption method, Can someone please give me a function to encrypt passwords the social engine way?
This is their function but i don't know how to implement it on my script:
function user_password_crypt($user_password)
{
global $setting;
if( !$this->user_exists )
{
$method = $setting['setting_password_method'];
$this->user_salt = randomcode($setting['setting_password_code_length']);
}
else
{
$method = $this->user_info['user_password_method'];
}
// For new methods
if( $method>0 )
{
if( !empty($this->user_salt) )
{
list($salt1, $salt2) = str_split($this->user_salt, ceil(strlen($this->user_salt) / 2));
$salty_password = $salt1.$user_password.$salt2;
}
else
{
$salty_password = $user_password;
}
}
$user_password_crypt = md5($salty_password);
return $user_password_crypt;
}
Thanks