当前位置:网站首页>Phpcms V9 remove the phpsso module
Phpcms V9 remove the phpsso module
2022-06-26 09:02:00 【CMS applet plug-in [official]】
phpsso Has always been phpsso Users' complaints , Because for most enterprise stations , There is no need to log in with multiple applications , Therefore, there is no need to phpsso, however phpcms The official didn't design a switch or something , It's mandatory phpsso, Even if it is mandatory , And we are often phpsso Of “ Communications ” stop , So many people are thinking about how to remove phpsso, Let the member function no longer depend on phpsso.
Because I want to develop phpcms v9 Wechat applet plug-in , It needs to connect with the member system , But damn phpsso It's crazy , And it is troublesome to get the user's Avatar , Because the default phpsso Your avatar is not stored , Therefore, it is difficult to read , So I decided to cut it down phpsso
(1) to v9_member Add a field to the table avatar, Used to store avatars , Set up varchar type .
(2) Comprehensive rectification phpcms\modules\member Under the index.php, Post some code :

(3) Comprehensive rectification phpcms\modules\member Under the member.php,content.php Basic modification and index.php Agreement
(4) Modify the code of all calling avatars in the foreground and background templates , The original no longer supports , And abolish the default method of modifying the avatar in the foreground , Change to phpcms Default image upload class , Picture call can be used directly $memberinfo['avatar'] and get_memberavatar($userid,$is_userid='1','') Method call .
(5) modify phpcms\libs\functions\global.func.php Medium get_memberavatar Method changed to :
- function get_memberavatar($uid, $is_userid='1', $size='30') {
- if($is_userid) {
- $db = pc_base::load_model('member_model');
- $memberinfo = $db->get_one(array('userid'=>$uid));
- if(isset($memberinfo['userid'])) {
- $uid = $memberinfo['userid'];
- $avatar = $memberinfo['avatar'];
- } else {
- return false;
- }
- }
- }
According to the above modification , Do a test , close phpsso after , You can still register your members at , At present, no other bug,.
To refuse to reach out to the party , The source code will not be released for the time being , You can contact me if you need , If you think it works for you , You can reward me , It doesn't matter how much , Respect the fruits of labor , It's not easy , Understand more ! Add me WeChat :15137100750 or QQ:2863868475
边栏推荐
- Clion installation + MinGW configuration + opencv installation
- Sqoop merge usage
- Some commands for remote work
- XSS 跨站脚本攻击
- Principle of playing card image segmentation
- 框架跳转导致定位失败的解决方法
- WBC learning notes (I): manually push WBC formula
- 1.17 daily improvement of winter vacation learning (frequency school and Bayesian school) and maximum likelihood estimation
- 1.26 pytorch learning
- Yolov5 advanced 5 GPU environment setup
猜你喜欢
随机推荐
小程序实现图片预加载(图片延迟加载)
在哪个软件上开户比较安全
isinstance()函数用法
phpcms v9手机访问电脑站一对一跳转对应手机站页面插件
Tensor
yolov5进阶之零环境快速创建及测试
phpcms v9商城模块(修复自带支付宝接口bug)
Detailed explanation of traditional image segmentation methods
什么是乐观锁,什么是悲观锁
Leetcode notes: binary search simple advanced
HDU - 6225 little boxes (\u int128)
Fourier transform of image
隐藏式列表菜单以及窗口转换在Selenium 中的应用
Yolov5 advanced 5 GPU environment setup
MPC learning notes (I): push MPC formula manually
读书笔记:SQL 查询中的SQL*Plus 替换变量(DEFINE变量)和参数
[program compilation and pretreatment]
【300+精选大厂面试题持续分享】大数据运维尖刀面试题专栏(一)
commonJS和ES6模块化的区别
Implementation code of interceptor and filter









