Personalize emails when double authentication is enabled

Customizing the email sent when activating the double authentication module

When activating the Double Authentication module you receive an email that can be customized with the following hooks:

For the subject of the message it is possible to use ####SITENAME#### which allows to retrieve the name of the site.

add_filter('secupress.plugin.passwordless_email_activation_subject', 'modify_passwordless_email_activation_subject'); function modify_passwordless_email_activation_subject() { 	return '[###SITENAME###] PasswordLess 2FA: Validation required'; 
}

For the body of the email, it is possible to use ####USERNAME#### which corresponds to the name of the user who activated the module and ###TOKENURL#### is the generated url to confirm the activation of the module.

add_filter('secupress.plugin.passwordless_email_activation_message', 'modify_passwordless_email_activation_message'); 
function modify_passwordless_email_activation_message() { 	
	return 'Hello ###USERNAME###, you just activated the double authentication module "PasswordLess".<br><br>To be sure this module can be activated, confirm your action by clicking the link below:<br><br><a href="###TOKENURL###">###TOKENURL###</a><br><br>Thank you, have a nice day!'; 
}

Customizing the email sent when connecting a user when the "passwordless" module is enabled

For the subject of the message it is possible to use ####SITENAME#### which allows to retrieve the name of the site.

add_filter('secupress.plugin.passwordless_email_subject', 'modify_passwordless_email_subject'); 
function modify_passwordless_email_subject() { 	
	return '[###SITENAME###] Secure Login Request'; 
}

For the body of the email, it is possible to use ###USERNAME#### which corresponds to the name of the user wishing to connect, ###SITENAME#### which allows to retrieve the name of the site and ###TOKENURL#### is the generated url allowing the user to connect.

add_filter('secupress.plugin.passwordless_email_message', 'modify_passwordless_email_message');
function modify_passwordless_email_message() { 	
	return 'Hello ###USERNAME###, a log-in has been requested for ###SITENAME###. <a href="###TOKENURL###">Open this page to really log in</a>.'; 
}