Programatically Sending Account Activation Email
-
Hi,
I understand this is custom and may be outside of scope, but wondering if you can provide any context for why this is no longer working with the update to V2.10.5.
On V2.10.4 I was running the following code to send a custom email template to a user and it was all working as expected. (I have rolled back to this older version and can confirm that this code is still working).
public function process_new_user_activation($user_id){UM()->common()->users()->set_status($user_id, 'awaiting_email_confirmation');UM()->common()->users()->assign_secretkey($user_id);um_fetch_user($user_id);
$args = array();
$args['{account_activation_link}'] = um_user( 'account_activation_link' );UM()->mail()->send( um_user('user_email'), 'custom_activation_email', $args );
um_reset_user();
}Since updating the V2.10.5, the ‘custom_activation_email’ email still sends, however the {account_activation_link} merge tag is no longer replaced in the email template.
I saw in the release notes that
um_user( 'account_activation_link' )should no longer be used andUM()->permalinks()->activate_url( $user_id ), however this has not fixed the issue for me… and alsoactivate_url()method does not accept any parameter.Any assistance would be much appreciated. Thanks
The topic ‘Programatically Sending Account Activation Email’ is closed to new replies.