2

I've got an EE 2.5.0 site that is using Profile:Edit 1.0.9. I've got member activation set to Manual activation by an Administrator. I can activate the Pending members via the control panel and it sends a default EE email notification fine (the Member Account Validation Notification email, saying that their account has now been activated).

Is it possible to trigger that email notification via the front end using the exp:profile:edit form? I can change a member's group so they change from Pending to another member group, but no emails are sent. Or if not, how else can I trigger an email without going into the backend CMS? Thanks.

Here's my code:

{exp:profile:edit include_jquery="no" datepicker="no" return="/extranet" member_id="{segment_4}"}

  <p><label>First name</label></p>
  <p><input name="cf_profile_first_name" placeholder="First Name" type="text" value="{cf_profile_first_name}" /></p>

  <p><label>Last name</label></p>
  <p><input name="cf_profile_last_name" placeholder="Last Name" type="text" value="{cf_profile_last_name}" /></p>

  <p><label>Email</label></p>
  <p><input name="email" placeholder="Email" type="text" value="{email}" /></p>

  <p><label>Member Group</label></p>
  {exp:profile:member_group_select}
    <option value="{option_value}"{if selected} selected="selected"{/if}>{option_name}</option>
  {/exp:profile:member_group_select}

  <input type="submit" value="Approve login request &raquo;"  />

{/exp:profile:edit}

2 Answers 2

1

You can definitely use Postmaster for this. You can use Postmaster to send emails for just about anything. Postmaste does a lot more than MX Notify Control, since Postmaster can be extended and passes a lot more variables to the templates, and can perform any amount of custom logic needed should you create your own hooks.

I have attached a screenshot of the available hooks. These hooks are the existing PHP classes included with Postmaster that extend the EE hooks to pass custom variables when specific hooks are triggered. If the desired hook doesn't exist and you need to pass custom variables to the template, you can use the Hook API.

Here is the reference for the Profile:Edit Edit Profile Hook

enter image description here

On a side note, I just noticed that the User Defined Hook appears twice in the list. This is a bug, I will fix it for the next maintenance release.

0
1

There isn't a great way to do this from the front end with Manual member activation, I think, because changing the member group doesn't actually trigger the hook needed (cp_members_validate_members) to send the email the cp normally sends.

However, if P:E will allow you to register the new members and change their group, thus creating their entries within your established profiles channel, you may be able to use MX Notify to send a custom email based on the creation of said new entry(ies). I'm not sure it'll be able to get to the email addresses though, but there might be a way to work it out.

1
  • Thanks for your reply, Jessica. Now you've mentioned MX Notify, I'm wondering if I can also use Postmaster for this, as I seem to remember Justin saying that he add some functionality to this to use with Profile:Edit. I've tweeted him and am just waiting for him to confirm.
    – Stephen
    Mar 20, 2013 at 15:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.