ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Automatically register someone after he has filled out a form without sending him to the register page?

August 19, 2007 4:55pm

Subscribe [4]
  • #1 / Aug 19, 2007 4:55pm

    maleika

    26 posts

    Hello all,

    is there a way to automatically register someone by having that person fill out a form without sending the person to the register page?


    What I need to do is allow someone to fill out a form on a basic page (e.g. template by the name of order), say mysite.com/order/

    Here is a form that the user fills out. Upon having filled out the form, he is redirected to 2Checkout. Upon returning to the site from 2checkout, he is automatically registered on the site.

    Is this possible? I have everything figured out except for how I can make the form into a sort of hidden registration form so that, upon hitting the submit button, a person is automatically signed up.

    Any pointers would be greatly appreciated.

    Thanks!

  • #2 / Aug 19, 2007 10:38pm

    Jeri Letman

    23 posts

    Hello all,

    is there a way to automatically register someone by having that person fill out a form without sending the person to the register page?

    Here is a form that the user fills out. Upon having filled out the form, he is redirected to 2Checkout. Upon returning to the site from 2checkout, he is automatically registered on the site.

    Thanks!

    Hi,

    EDIT: When I first answered, I didn’t see that the form you were using was generated by EE. The solution I describe below requires PHP knowledge.


    I “rolled my own” solution for a client that used EE and 2Checkout. The site had membership tables for 4 or 5 other programs, so creating our own program was easier than hacking EE. (This was done before Extensions were available.) We also did this because we wanted different signup emails sent out. Different groups were sent different instructions.

    To do this we set up the process as you described above. The person fills in a form.  the information is added to the EE membership table with a pending status. We also added data to the exp_member_data tables. Then they are redirected to 2CO for payment. After successful payment, they are returned to the site and their membership group is changed.

    IIRC, the only thing that we had to be careful about was the password and the unique id. They have to be encoded the way EE expects them.

    HTH,

    Jer

  • #3 / Aug 20, 2007 2:59am

    maleika

    26 posts

    Thank you very much for your help. :D

    The problem is, I do not know PHP to the point where I could safely say this is something I can create. :(

    If there are any alternate takes on how to approach this issue, I’d be very interested.

    Thanks again

  • #4 / Jan 07, 2008 3:36pm

    bkuberek

    124 posts

    IIRC, the only thing that we had to be careful about was the password and the unique id. They have to be encoded the way EE expects them.

    hi,

    I was able to achieve the same application form. However I am not sure how to create the `unique_id`.

    I have encode the password like this:

    FNS->hash($pwd);

    But I am not sure where the unique_id comes from. Could you please give me some advice?

    Thanks

  • #5 / Jan 07, 2008 5:22pm

    bkuberek

    124 posts

    found it:

    $data = array(
                        "username"        => $username,
                        "screen_name"     => $first_name,
                        "password"        => $FNS->hash($pwd),
                        "unique_id"       => $FNS->random('encrypt')
    );
.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases