当前位置:网站首页>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
边栏推荐
- Convert verification code image to tfrecord file
- Fast construction of neural network
- Section IV HQL execution process
- 基于SSM的毕业论文管理系统
- 1.21 study gradient descent and normal equation
- Selenium 搭建 Cookies池 绕过验证反爬登录
- Some commands for remote work
- phpcms手机站模块实现自定义伪静态设置
- Summary of common instructions for arm assembly
- Machine learning (Part 2)
猜你喜欢

【MATLAB GUI】 键盘回调中按键识别符查找表

Drawing with MATLAB (2) -- color ring

Reverse crawling verification code identification login (OCR character recognition)

Trimming_ nanyangjx

力扣399【除法求值】【并查集】

phpcms v9去掉phpsso模块

Corn image segmentation count_ nanyangjx

phpcms小程序插件4.0版正式上线

实践是成为网工最快的方法,网络工程师实战项目整理

Yolov5 advanced III training environment
随机推荐
直播回顾 | smardaten李鸿飞解读中国低/无代码行业研究报告:风向变了
Install Anaconda + NVIDIA graphics card driver + pytorch under win10_ gpu
Steps for ROS to introduce opencv (for cmakelist)
cookie session 和 token
Detailed process of generating URDF file from SW model
Speckle denoising method for ultrasonic image
Fourier transform of image
Data warehouse (1) what is data warehouse and what are the characteristics of data warehouse
yolov5进阶之零环境快速创建及测试
Leetcode notes: binary search simple advanced
Formula understanding in quadruped control
Programming training 7- date conversion problem
Summary of common instructions for arm assembly
Yolov5 advanced 5 GPU environment setup
torch. fft
Drawing with MATLAB (1)
phpcms v9后台增加阅读量字段,可任意修改阅读量
在哪个软件上开户比较安全
Yolov5进阶之五GPU环境搭建
Some commands for remote work