AbanteCart Development > Development Help Needed

send post data to new view

(1/1)

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


--- Code: --- //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);
--- End code ---

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

Navigation

[0] Message Index

Go to full version
Powered by SMFPacks Social Login Mod