News:

AbanteCart v1.4.2 is released.

Main Menu

send post data to new view

Started by shahiran12395, July 25, 2019, 06:12:58 AM

Previous topic - Next topic

shahiran12395

hi there, im creating new condition where if user exist in system2 the login controller will fetch the data from the system2 and auto register the user. so how can i auto submit the fetch data to rt='account/create'?

below is my code. i just need to post the data to account/create

//execute the POST request
                $result = curl_exec($ch);

                //close cURL resource
                curl_close($ch);

                if($result=="false"){
                    header('Location: ' . url.'?rt=account/login&false_entry_login_detail=1');
                    die();

                }
                $user_data = json_decode($result);

abolabo

Hi.
You should to use hooks of controller account/create.

//before controller run (init) you can check is request POST and do something.
see https://github.com/abantecart/abantecart-src/blob/master/public_html/storefront/controller/pages/account/create.php#L33

Also you can do something after account creation  https://github.com/abantecart/abantecart-src/blob/master/public_html/storefront/controller/pages/account/create.php#L75
with updateData hook
"No one is useless in this world who lightens the burdens of another."
― Charles Dickens

Forum Rules Code of conduct
AbanteCart.com 2010 -