So I’m developing a website that has to accept new member registration from a mobile app.
I have found the Member Module Registration Extension, although I must admit I still have limited experience working with EE extensions.
If I were to post the results of a member registration form (remember, this is not on the same EE site, this is either through as third-party site or mobile app) to a page on the EE site which would process that information and insert it into the member module registration extension, I should be able to easily create new members?
If this is not the case, how would I go about accomplishing what I’m trying to do?
If this is the case, I’m having a little trouble understanding how to use the extension hooks. The extension hooks are in PHP, so I would place my extension code in either (1) a module or (2) a template with PHP code.
Whichever method I would select, I would essentially be grabbing the post data, processing it, running some validation, inserting the data into the extension, and grabbing a response from the extension (success, error, etc.) ...correct?
If so, I need help understanding how to accomplish the last two parts - inserting the data into the extension and grabbing the response. Can anyone offer any advice? The documentation seems somewhat unclear/incomplete, although that could be from my lack of understanding. My best attempt based off the documentation would be something like:
$member_data = array('username' => $processed_username, 'screen_name' => $processed_username, 'password' => $processed_password, 'email' => $processed_email);
$edata = $this->extensions->call('member_member_register', $member_data);Sure, this seems simple enough, but it leaves me with three questions:
1. Am I using the correct keys for the member_data array? (username, email, etc.) Where can I get a list of these keys?
2. Am I leaving anything out in regards to the API? What is “member_member_register_start” for?
3. How can I tell if the registration was successful or not? I’m assuming data is returned to $edata, yes? What does this data look like?