Integrate discuz’s pass: How to integrate dede using discuz’s own pass and file download
First of all, thank you Plato for providing such a good free program
See everyone on the forum Many want to integrate discuz. I think Plato will definitely get a very complete dede pass.
Before we come out, let’s use the pass that came with discuz. I personally looked at it and it was very good.
1: Prerequisite preparation and version:
dede version: 3.1 lit version, 3.1 official version tested all passed
discuz version. The latest version 5.0 is used
2: Mainly involves several files
1: dede:
(1)include/config_passport.php
Mainly pass private key. This is related to security, and the two system settings must be the same to work
Here it is mainly $cfg_pp_encode. Assume it is set to $cfg_pp_encode = 'UfJDq4089S'
(2)member/index_do.phpMainly handles synchronous login, synchronous registration, and synchronous exit with discuz
As for members Synchronous modifications (mainly passwords and emails) have been completed using the pass mechanism during synchronous login. So don’t ask anymore about password synchronization
(3) Newly added file zxwpassport.php
It mainly sets the synchronization discuz switch and synchronization related processing functions
Note: here The relevant jump address should be modified according to your test or actual address
For example: Location: http://localhost/discuz/api/passport.php
Change to your Location: http://localhost/bbs/ api/passport.php
$forward = 'http://localhost/member/index.php';
Change to yours
$forward = 'http://www.aaa.com/member /index.php';
2: discuz
(1) Mainly manage and set the discuz pass in the system background as shown in the figure
Set it in the extended settings-"Pass Settings
Note that this is the address for setting up dede’s member login, member registration, and member exit
The key is to set the pass private key and remember to refer to dede’s include/config_passport.php Configuration. It is assumed here that it is UfJDq4089S
. After understanding this, download zxwpassport.php and the modified index_do.php in the
member/ directory. Ok. Here index_do.php only adds discuz synchronization processing, which is very simple
For example, synchronous login usually only needs to add an email extraction when logging in.
CODE:
$dsql->Close();
//Start synchronous login with discuz forum
if ($cfg_discuz==1)
{
discuzlogin($userid,$ pwd,$dedeemail);
}//$cfg_discuz==1 End
//Synchronized login with disuz forum ends
[Copy to clipboard]
$forward = 'http://localhost/member/index.php';
Of course, it can also be written to the configuration file. But I’m too lazy to write. Let’s do it ourselves. Very simple
zxwpassport.php and index_do.php files are packaged into passport.rar file
Download this file
http://www.bkjia.com/PHPjc/317850.html