php - Operation problems after the registration verification email expires
大家讲道理
大家讲道理 2017-06-30 09:52:35
0
3
1041

Regarding the issue of registration verification email, my idea is as follows:

  1. Add the status field to the database to record the email verification status. The default is inactive

  2. Send a verification email address to the user's email address, and the user can activate the email address only after clicking it

  3. If the user is not activated within a certain period of time, the user data will be deleted

My confusion lies in the third article (of course there are other ambiguities that can also be pointed out)

  1. Do you want to violently delete it after it has been inactive for a period of time? Will that be okay? (Is the way of doing this inappropriate?)

  2. [Key]How to delete data

How to delete data [Question]

  1. My idea is to add a user creation time, and then delete the data based on the user creation time and activation status.
    But I don’t know what the specific idea is.

  2. Also, I don’t know whether to use a programming language to write logical deletions or use a MySQL database to write logical automatic deletions.

  3. I know a lot about NoSQL, but I am curious whether this function can be implemented using NoSQL such as redis and memcache. Which one is better than mysql?

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

reply all(3)
三叔

The email verification field should be added to the user table. If you want to keep application records, you can create a new table

给我你的怀抱
  1. You can create a field for email activation or not. There is no need to delete it if it is not activated

  2. You can use php to write the deletion logic, and then start a scheduled task to execute it. Go and operate mysql regularly.

  3. You will eventually need to implement mysql to modify the data. In fact, it doesn’t matter which one you use!

  4. I don’t recommend deleting records directly. But it can be deleted

仅有的幸福

With redis, you can set the expiration time, so you don’t need to maintain the deletion operation yourself

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template