Events Made Easy Forums Bug fixed or feature request implemented Add a hook into when approving a new member

Tagged: 

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #57112
    Anonymous
    Inactive

    Hi Franky,

    First off, AMAZING PLUGIN! I’m really glad I found this one. Clients will love all the customization I’m able to do with this, and your level of maintenance/support gives me confidence to use it.

    Unless I’m overlooking something, one thing I’d like to see it do is create a WordPress user when a new member is approved. I’m not the fastest programmer, but I figure I can code this myself if I insert a hook somewhere in eme_members.php. Membership has to be approved by my client, and there are dues, so I’m thinking the hook should go into eme_ajax_action_set_member_paid (?). I’d like to know where you think it’d go best though.

    I’m more than happy to contribute the function I write that handles this after I get it working. I’d be proud to help improve this great plugin!

    #57113
    Franky
    Keymaster

    That is indeed the place where such an action could go. I’d do it like this:

       foreach ($ids_arr as $member_id) {
           $res = eme_member_set_paid($member_id);
           if ($res) {
                   if ($send_mail) {
                           $member = eme_get_member($member_id);
                           $res2 = eme_email_member_booking($member,$action,$queue);
                           if (!$res2) $mails_ok=0;
                   }
                   if (has_action('eme_member_paid_action')) do_action('eme_member_paid_action',$member_id);
           } else {
                   $action_ok=0;
           }
       }

    Then, in your action, you can call eme_get_member to get the complete memberinfo for that memberid (and eme_get_answers for custom answers). There’s no field yet for passwords though, although adding a new fieldtype is very easy to do (adding it in the function eme_get_fieldtypes should be sufficient).
    Make sure to link the newly created WP user to the person in EME (the person is linked to the memberships for that person) using the column wp_id in wp_eme_people. And for passwords in WP, use wp_set_password or wp_hash_password.

    #57123
    Anonymous
    Inactive

    Thanks, looks great!

    The client also wants to have a forum inside a members section so I’m thinking about using bbPress and Ultimate Member with EME. At this point, I need to figure out the most straightforward way to handle it. At the moment, my ideal solution is to configure the EME registration form with the same fields as the Ultimate Member profile information so that the function I write that hooks in also passes the information to the extended profile.

    The alternative is hooking in into Ulimate Member to create an EME member. While I imagine this would be an easier function to write, there’s no payment capability with Ultimate Member. So after being approved and having an EME member created and assigning membership the new member would have to log in and then somehow pay dues via EME. (I’m sure I can make such a dues-payment page with EME.)

    Anyway, I speak to the client tomorrow. It might be that they’d prefer (or are willing) to handle the new member payment offline. I think that could make my job easier…

    Thanks again!

    #57137
    Franky
    Keymaster

    EME has already several only payment gateways integrated. But why would you still need another member plugin? I’m guessing writing a simple function that denies access to a page if not having a specific membership isn’t that difficult …

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘Bug fixed or feature request implemented’ is closed to new topics and replies.
Scroll to Top