Question

I am using Laravel4 and the Sentry2 package.

I have a user registering and logging in successfully but I need help sending the email activation.

My plan is to send an email with a link containing the users email and their activation code. The user will then be routed to a point where I can check this code in the URL vs the one in the database. Does this sound correct?

Thank you.

Was it helpful?

Solution

Yes, this is correct. The typical user registration flow is:

  1. User registers with username, password, email.
  2. CMS sends email with a random key (which is also stored on the user row).
  3. User goes to their email to click activation link that contains the random key (and sometimes user id) in the URL.
  4. CMS detects "user activation" link, takes the activation link and user ID and checks it against the database where "user is not active".
  5. If found, set the user row to "user is active" and delete the activation key column.
  6. (Optional) send welcome email.
  7. Prompt for user login.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top