Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Creating email activation auth.
  • Hey, i want to create a user registration system, when the user need to activate the acc from email, where a activation link has sent, by far i though of creating a temp_user table where i create user and store its activation code, and on activation i send the cut->paste the user data to user table, but my question is this, how i use auth:create_user on different table other then main user table?

    Or add a fields to user tabel "bolean- status'', "varchar255 - activivation code" ?
  • HarroHarro
    Accepted Answer
    We use the login_hash field for it.

    When a user registers, we add the user to the "confirm-by-email" group, and generate a confirm hash for it that we store in the login_hash field. This hash will be part of the URL in the confirmation email. When clicked on the link, it's used to do a lookup, and if a match is found, we change the group to "users".

    We store a timestamp in the profile_fields, so that the email can expire. We have a task that periodically scans the user table for all users in the "confirm-by-email" group, checks if the timestamp has expired, and if so, deletes the user.

    We use Ormauth, so we access the record through the model, but with Simpleauth you can use DB calls to update the record directly.

    With this method you can keep using the create_user() method without problems, and no changes to the table are needed.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion