Home Backend Development PHP Tutorial discuz! X3.2 Forum password modification is not synchronized with UCenter

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

Aug 08, 2016 am 09:31 AM
Note urlencode

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!

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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

PHP's urlencode() function: How to encode a string into a URL-safe format PHP's urlencode() function: How to encode a string into a URL-safe format Nov 03, 2023 pm 12:39 PM

PHP's urlencode() function: How to encode a string into a URL-safe format, specific code examples are needed. With the development of the Internet, URLs are widely used in daily life, and we often need to encode strings with some special characters into URL-safe formats. Format to pass parameters in the URL or request a web page. PHP provides the urlencode() function to accomplish this task. This article will introduce the usage of urlencode() function and give some specific code examples. 1. ur

How to use urlencode function to encode URL in PHP How to use urlencode function to encode URL in PHP Jun 26, 2023 pm 12:48 PM

In modern development, passing data through URLs is a common way. However, because the URL may contain some special characters, such as spaces, slashes, and question marks, these special characters will destroy the structure of the URL and cause data transmission to fail. In order to avoid this situation, PHP provides the urlencode function, which can encode the URL into a transportable format. The use of the urlencode function is very simple. Its syntax is as follows: stringurlencode(string

Infinix Note 40s gets listed online with all features and specifications Infinix Note 40s gets listed online with all features and specifications Jun 30, 2024 pm 09:32 PM

Infinix Note 40s is the newest addition to the Note 40 lineup. Not much is under wraps; the phone is now listed with all its features on the official webpage, as spotted by PassionateGeekz. Other phones currently found in the Infinix Note series (the

Introduction to PHP functions—urlencode(): encode URLs Introduction to PHP functions—urlencode(): encode URLs Jul 25, 2023 pm 09:25 PM

Introduction to PHP functions—urlencode(): Encoding URLs When developing web applications, you often encounter situations where URLs need to be encoded. URL encoding ensures that special characters in URLs are passed correctly, avoiding problems or incorrect results. In PHP, we can use the urlencode() function to perform URL encoding. The function of urlencode() function is to convert the string into an encoding format that conforms to the URL specification. It converts non-alphanumeric characters in a string to

How to use urlencode function How to use urlencode function Nov 15, 2023 am 11:45 AM

Usage: 1. Used to encode dictionary; 2. Used to encode list; 3. Used to encode nested list; 4. Specify separator, etc.

How to use the urllib.urlencode() function to encode parameters in Python 2.x How to use the urllib.urlencode() function to encode parameters in Python 2.x Jul 29, 2023 pm 12:57 PM

How to use the urllib.urlencode() function to encode parameters in Python2.x During the programming process, we often need to interact with the server and pass parameters. In the process of passing parameters, we need to properly encode the parameters to ensure the correct transmission and parsing of data. Python provides the urllib library, in which the urlencode() function is a tool used to encode parameters. Let's take a look at Python2.x

How to use the urlencode function to encode special characters in PHP How to use the urlencode function to encode special characters in PHP Jun 26, 2023 pm 04:09 PM

In PHP, we often need to encode special characters in the URL in order to pass parameters correctly. At this time, you can use the urlencode function. The function of the urlencode function is to encode special characters in the string so that they can be passed in the URL. These special characters include: alphanumeric characters, punctuation marks, protocol characters, some reserved characters, etc. The following is the basic syntax of the urlencode function: urlencode(string$str):str

The new mid-range phone is equipped with a 1.5K hyperbolic screen + 50Mp outsole lens, and may belong to the Xiaomi Redmi Note series The new mid-range phone is equipped with a 1.5K hyperbolic screen + 50Mp outsole lens, and may belong to the Xiaomi Redmi Note series Jul 30, 2024 pm 12:45 PM

On July 29, the well-known digital blogger @digitalchat.com revealed the key configuration information of a certain brand’s upcoming mid-range phone series. The comments section and leaked information speculated that it is expected to be Xiaomi’s Redmi Note14 series phone. 1. According to bloggers, this mid-range phone series will adopt a 1.5K resolution hyperboloid screen design and be equipped with a 50-megapixel (50Mp) outsole elliptical lens module. In terms of body material, this series of mobile phones seems to have chosen a more economical plastic middle frame, and is also equipped with short-throw optical fingerprint unlocking technology. In terms of processor, the ultra-large version of this series of mobile phones is expected to be equipped with MediaTek's Dimensity series processor, manufactured using the second-generation TSMC 4nm process, with a main frequency of up to 3.0GHz. This configuration information

See all articles