OneThink forgot password OneThink reset background password

1. Recently, I was learning the ThinkPHP framework. I learned about the OneThink content management framework on the ThinkPHP.cn platform. However, I installed OenTink locally, but after a long time, I opened it again and accidentally found that the OenThink background login password was forgotten. After searching, I saw a tutorial to solve this problem in Baidu. The purpose of writing this article is to learn the OneThink content framework and strengthen the understanding of ThinkPHP.

2. Let me introduce how to reset the OneThink background login password:

(1) First of all, I know that OneThink has a password encrypted string, and find the User user module (under the User folder) under the Application project (under the Application folder), and find config under the configuration folder (Conf). php file, find the following code in the file:

And open the following picture: Find the custom constant: the value of UC_AUTH_KEY:

Write picture description here

(2), and then find the login method in the public of admin and add these two pieces of code:

Write picture description here

The first parameter is the password to set, and the second is the encrypted string just found.

(3) After entering the login page, you can see a line of strings displayed in the upper left corner of the page, then copy the strings to the database to modify and replace, and then comment two lines of code to log in to the background with the password you just set.

Guess you like

Origin blog.csdn.net/whoas123/article/details/78309487