discuz! X3.2 Forum Change Password different steps ucenter

Source: Internet
Author: User
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.

  • 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.