Discuz! X3.2 changing Forum password does not synchronize UCenter

Source: Internet
Author: User
: This article mainly introduces discuz! In the X3.2 Forum, changing the password does not synchronize the UCenter. if you are interested in the PHP Tutorial, refer. As with registration, discuz's password change is one-way modification and will not actively notify other application sites. To implement this function, you can only change the UCenter mechanism. The following describes the steps:

Change 1: The notification program after the password is changed in the UC background: home directory/uc_server/control/admin/user. php line 277
Set:
$ _ ENV ['note']-> add ('updatepw', 'username = '. urlencode ($ username).' & password = ');
Changed:
$ _ ENV ['note']-> add ('updatepw', 'username = '. urlencode ($ username).' & password = '. $ orgpassword );


Modify 2: UC notification program: main directory/uc_server/control/user. php 99
Set:
$ _ ENV ['note']-> add ('updatepw', 'username = '. urlencode ($ username).' & password = ');
Changed:
$ _ ENV ['note']-> add ('updatepw', 'username = '. urlencode ($ username).' & password = '. $ newpw );


Modify 3: home directory/uc_client/control/user. php 99th
Set:

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

Changed:

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

The preceding modification can only allow discuz to synchronize with the UCenter, but cannot notify other application sites. to change the password of the forum, you must modify the logon mechanism of the application site if the site can also be used.

I am currently using this method: when logging on to the application site, I first use the account and password to verify whether I can log on to the Forum (uc_user_login can be implemented. for details, refer to the UCenter interface development manual). if I can log on, update the password of the application site as the entered password. if you cannot log on to the application site, you will be prompted that the user password is incorrect. in this way, the same function can be implemented, but the application site is a waste of code.

If there is a better way to update again !!

The above introduces discuz! In the X3.2 Forum, changing the password does not synchronize with the UCenter, which includes some content. I hope my friends who are interested in the PHP Tutorial will be helpful.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.