Discuz!官方免费开源建站系统

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

整合其他程序后,从Discuz登录,其他程序不同步问题,及解决方法

[复制链接]
suxiaojack 发表于 2014-5-27 18:25:14 | 显示全部楼层 |阅读模式
UC上整合PHPDISK,通信正常。从PHPDISK登录,退出都能在Discuz上同步。但是反过来Discuz登录,退出没发送给其他APP。
一开始以为是PHPDISK这边设置有问题,所以Discuz发信息过来会不能正常处理,调了很久,无果。
后来从Discuz这边跟进,发现压根没有发出同步登录信息。
Discuz登录时会调用uc_client中的这个函数
function uc_user_synlogin($uid) {
        $uid = intval($uid);
        if(@include UC_ROOT.'./data/cache/apps.php') {
                if(count($_CACHE['apps']) > 1) {
                        $return = uc_api_post('user', 'synlogin', array('uid'=>$uid));
                } else {
                        $return = '';
                }
        }
        return $return;
}
而这个函数会导致uc_api_post广播不能正常发出,原因在于uc_client端的$_CACHE['apps']没有1个以上,只有1个。
uc_server/data/cache/apps.php中是会随着更新缓存更新的。
但是uc_client/data/cache/apps.php这个文件,不能自动更新。
解决的办法是,复制server的apps.php。或者修改>1判定为>0。


您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2025-3-12 19:58 , Processed in 0.025094 second(s), 4 queries , Gzip On, Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表