dedecms整合discuz后需要解决的一个问题,就是前台修改dedecms账号的密码后,同步不到后台discuz论坛上,造成用户登录失败,需要在后台修改密码和前台找回密码增加代码:
$password = $pwdok;
$salt = substr(uniqid(rand()), -6);
$password = md5(md5($password).$salt);
$query = “UPDATE `pre_ucenter_members` SET password=’$password’,salt=’$salt’ WHERE username=’$userid’”;
$dsql->ExecuteNoneQuery($query);
$query2 = “UPDATE `pre_common_member` SET password=’$password’,salt=’$salt’ WHERE username=’$userid’”;
$dsql->ExecuteNoneQuery($query2);
本文来自seowhy论坛 转载请注明