UCenter修改密码时通知其它应用的密码为空的解决方案!

Ucenter数据库中的用户表列表

在A应用中修改用户密码之后,在更新用户密码的通知列表中,发现password为空!

password为空应该是基于安全考虑了的,分析代码执行流程,解决方案如下,在password中我是采用md5加密的:

UCenter后台更改密码后的通知程序:
ucenter.kchmc.net/control/admin/user.php

//$_ENV[‘note’]->add(‘updatepw’, ‘username=’.urlencode($username).’&password=’);
$_ENV[‘note’]->add(‘updatepw’, ‘username=’.urlencode($username).’&password=’.md5($orgpassword));

UCenter通知程序:
ucenter.kchmc.net/control/user.php

//$_ENV[‘note’]->add(‘updatepw’, ‘username=’.urlencode($username).’&password=’);
$_ENV[‘note’]->add(‘updatepw’, ‘username=’.urlencode($username).’&password=’.md5($newpw));

如果是在A应用里修改密码,而需要通知的其它应用使用独立用户数据库,则需要修改ucenter客户端(uc_client)的相应代码:
kchmc.net/phpsso_server/api/uc_client/control/user.php

//$_ENV[‘note’]->add(‘updatepw’, ‘username=’.urlencode($username).’&password=’);
$_ENV[‘note’]->add(‘updatepw’, ‘username=’.urlencode($username).’&password=’.md5($newpw));

更新程序之后的通知表!

现在有可能kchmc.net与ucenter.kchmc.net已经更新了密码,但是其它的应用有可能还未通知,或者通知失败,现在一种解决方案便是继续等待,或者直接手动在ucenter.kchmc.net通知列表中操作再次通知!

永夜