As with registration, Discuz changes the password is one-way modification, does not actively notify other application sites. To implement this function can only change the mechanism of Ucenter, the following steps are given:
Modify one: Notification program after the UC background change password: Home directory/uc_server/control/admin/user.php 277 rows
Will:
$_env[' note ']->add (' updatepw ', ' username= '. UrlEncode ($username). ' &password= ');
Change to:
$_env[' note ']->add (' updatepw ', ' username= '. UrlEncode ($username). ' &password= '. $orgpassword);
Modified two: UC Notifier: Home directory/uc_server/control/user.php 99 rows
Will:
$_env[' note ']->add (' updatepw ', ' username= '. UrlEncode ($username). ' &password= ');
Change to:
$_env[' note ']->add (' updatepw ', ' username= '. UrlEncode ($username). ' &password= '. $NEWPW);
Modified three: Main directory/uc_client/control/user.php line 99th
Will:
$_env[' note ']->add (' updatepw ', ' username= '. UrlEncode ($username). ' &password= ');
Change to:
$_env[' note ']->add (' updatepw ', ' username= '. UrlEncode ($username). ' &password= '. $NEWPW);
The above changes can only let Discuz sync ucenter, and can not notify other application sites, to achieve in the forum to change the password, in the site should also be used if you need to modify the application site login mechanism.
I temporarily use the method is: The application site login with the account password authentication in the forum can be logged in (Uc_user_login method can be implemented, see the Ucenter Interface Development manual), if you can log in, then update the application site password for the input password, if you cannot log in, That will prompt the user password error, this can also achieve the same function, but the application site to waste a bit more code.
If there is a better way to update!!
The above describes the discuz! X3.2 Forum Change Password different steps ucenter, including the aspects of the content, I hope that the PHP tutorial interested in a friend helpful.