Home >Backend Development >PHP Tutorial >How does discuz determine whether a user is activated?
After registering a user in the pre_ucenter_members table, it is not activated when logging into the forum.
How does discuz determine whether a user is activated?
There is no user information in the pre_common_member table at the beginning.
After testing, I found:
If it is not set to activate directly, user information will be automatically added to pre_common_member when the user logs in for the first time.
If it is set not to be activated directly, user information will be added to pre_common_member when the user logs in for the first time. And add user information in pre_common_member after manual activation.
But I have never found a field in the data table to determine whether it has been activated.
I wonder if it is judged by the password field in the pre_common_member table?
Because after I added the information manually, it was not actually activated.
Moreover, the encryption methods of passwords in the pre_common_member and pre_ucenter_members tables are different. The encryption method in the pre_ucenter_members table is easy to find online, but I have never found the encryption method of the password in pre_common_member. Please help!
To summarize, two questions:
1. How does discuz determine whether an account has been activated? Is it determined by password?
2. Regardless of the answer to the previous question, I would like to know how the passwords in the pre_common_member table are encrypted?
Thank you.
Supplement:
I found that the password in the pre_common_member table does not affect login and can be modified at will.
Therefore, it can be ruled out that the password is used to determine the activation status.
So, how to determine whether the user has been activated?
After registering a user in the pre_ucenter_members table, it is not activated when logging into the forum.
How does discuz determine whether a user is activated?
There is no user information in the pre_common_member table at the beginning.
After testing, I found:
If it is not set to activate directly, user information will be automatically added to pre_common_member when the user logs in for the first time.
If it is set not to be activated directly, user information will be added to pre_common_member when the user logs in for the first time. And add user information in pre_common_member after manual activation.
But I have never found a field in the data table to determine whether it has been activated.
I wonder if it is judged by the password field in the pre_common_member table?
Because after I added the information manually, it was not actually activated.
Moreover, the encryption methods of passwords in the pre_common_member and pre_ucenter_members tables are different. The encryption method in the pre_ucenter_members table is easy to find online, but I have never found the encryption method of the password in pre_common_member. Please help!
To summarize, two questions:
1. How does discuz determine whether an account has been activated? Is it determined by password?
2. Regardless of the answer to the previous question, I would like to know how the passwords in the pre_common_member table are encrypted?
Thank you.
Supplement:
I found that the password in the pre_common_member table does not affect login and can be modified at will.
Therefore, it can be ruled out that the password is used to determine the activation status.
So, how to determine whether the user has been activated?
First of all, Discuz
users are activated, among which Ucenter
users are automatically activated Discuz
for forum users, you can take a look at class_member.php (about line 91)
<code>$result['ucresult']['uid']; $user_t=uc_user_login($result["ucresult"]["username"], $result["ucresult"]["password"]); $user_inf = DB::fetch_first(“SELECT * FROM ”.DB::table(‘common_member’).” WHERE uid=”.$uid);</code>
Encryption methodmd5
Hope it helps you