discuz! X3.2 Forum password modification is not synchronized with UCenter

WBOY
Release: 2016-08-08 09:31:47
Original
1057 people have browsed it

Similar to registration, discuz password modification is a one-way modification and will not proactively notify other application sites. To achieve this function, you can only change the mechanism of UCenter. The steps are given below:

Modification 1: Notification program after changing password in UC background: Home directory/uc_server/control/admin/user.php Line 277
Will:
$_ENV ['note']->add('updatepw', 'username='.urlencode($username).'&password=');
Change to:
$_ENV['note']->add('updatepw ', 'username='.urlencode($username).'&password='.$orgpassword);


Modification 2: UC Notifier: Home Directory/uc_server/control/user.php Line 99
will:
$_ENV ['note']->add('updatepw', 'username='.urlencode($username).'&password=');
Change to:
$_ENV['note']->add('updatepw ', 'username='.urlencode($username).'&password='.$newpw);


Modification 3: Main directory/uc_client/control/user.php line 99
will:

$_ENV[' note']->add('updatepw', 'username='.urlencode($username).'&password=');

Change to:

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

The above modification can only allow discuz to synchronize UCenter, but cannot notify other application sites. If you want to change the password in the forum Finally, if it can be used on this site, you need to modify the login mechanism of the application site.

The method I use temporarily is: when logging in to the application site, first use the account and password to verify whether you can log in to the forum (uc_user_login method can be implemented, please check the UCenter interface development manual for details). If you can log in, then update the application site The password is the entered password. If the user cannot log in, it will prompt the user that the password is incorrect. This can also achieve the same function, but the application site will waste more code.

If there is a better way, please update again! !

The above has introduced the discuz!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!