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!