You can use userAfterInsert hook. For example in site.php: PHP: Am_Di::getInstance()->hook->add(Am_Event::USER_AFTER_INSERT, 'onUserAfterInsert'); function onUserAfterInsert(Am_Event $event){ $user = $event->getUser(); /// Add code that will insert $user->user_id to other table }
Thanks Alexander... but still confused. Not familiar with the code offered. do I add it to the signup.php page? and where do i direct to the proper database and column? Any help would be appreciated. Thanks again
Above should be added to /amember/application/configs/site.php You also have to add code that will update your third-party database as well.
For amember 3 you can place this code to /amember/site.inc.php: PHP: setup_plugin_hook('finish_waiting_payment', 'fwp'); function fwp($payment_id){$payment = $GLOBALS[db]->get_payment($payment_id);// $payment[member_id] - user id;// Now place your code that will add user id to third party database. }
This is how my file looks... not an expert by any stretch. HELP!!! just need to add the new users member_id to the second table . <?php if (!defined('INCLUDED_AMEMBER_CONFIG')) die("Direct access to this location is not allowed"); /* * aMember Pro site customization file * * Rename this file to site.inc.php and put your site customizations, * such as fields additions, custom hooks and so on to this file * This file will not be overwritten during upgrade * */ setup_plugin_hook('finish_waiting_payment', 'fwp'); function fwp($payment_id){ $payment = $GLOBALS[db]->get_payment($payment_id); // $payment[member_id] - user id; // Now place your code that will add user id to third party database. $sql_memberUpdate = 'INSERT INTO recruiter_specialties ('$payment[member_id]', 0)'; } ?>