0

I need to integrate aMember with Interspire. I need aMember to completely sync with Interspire. When users register for aMember, they are also placed in the Interspire database, and are placed in the right group so that we may restrict access.

I have searched for a plugin to do this, and haven't found anything. I have also tried to make the plugin myself, but I have found no basic samples of such a plugin. I looked on the Wiki but the info and examples there are not much help. I have also tried to look at other plugins for other systems, but sense those other systems are different from Interspire, the way they are handled is not exactly how you would handle integrating with Interspire, so I was wondering if there is something we can do to get this plugin made, Or some more examples to look at that better explain how to make the plugin myself.

Tommy Wilkey
  • 127
  • 2
  • 11

2 Answers2

0

I know this is an old question, however I have a solution I have used and it works. Just answering this in the event you never found the solution, or someone else stumbles upon this and needs an answer.

You don't need to create a plugin for aMember. Using cURL in PHP you can make 1 action perform 2 things at the same time.

You would need to modify the registration step. It has been a while since I looked in the amember code to tell you which php file to edit, ect and its different probably with different amember versions..

On your registration form you should have HTML code for the form, it's action URL should point you to the correct file. It would start something like:

<form action="registration.php" method="post" class="something">
rest of the code here...

So in that example, I would look at registration.php and it should then take the data the user entered and handle it. it probably checks if the users exists in your amember users, if not then it adds them. At that point, you know everything is good and if your amember is setup to then send the user to paypal, it may have code for starting the payment integration. Between those steps (after it added the user to your db and before it sends them off to go pay) add your own code. You could just add the php code right there to use curl and add them to interspire. My way, I would create a function and just add 1 line of code to this file to call that function.

AddToIEM(firstname,lastname,ip,email)

Then there is probably a functions.php file for amember. In that file, i would create a function to add take their info passed above and add them into your IEM.

Additionally, you could take the plugin amember has for Aweber integration and modify it to use Interspire.

This is just an idea outline, and not real working code. You will need to lookup curl and figure out how to use it to add them into your interspire.

IncomePitbull
  • 302
  • 2
  • 4
  • 14
0

You can do this pretty easily with the amember hook system. I actually will probably be doing this sometime soon. If I do, I'll try to post a snippet. In the meantime, just take a look at the signup hooks in amember.