si gamumail est activé et le slug mail_inscription existe, passer par Gamumail pour l'envoi du mail d'inscription
This commit is contained in:
parent
e72c81d385
commit
884bab15fc
1 changed files with 15 additions and 10 deletions
|
@ -13,7 +13,11 @@ if (!defined('_ECRIRE_INC_VERSION')){
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function inc_comptespip_mail_inscription_dist(int $id_auteur, array $options = []) :void{
|
function inc_comptespip_mail_inscription_dist(int $id_auteur, array $options = []) :void{
|
||||||
|
if (test_plugin_actif('gamumail') and sql_countsel('slug', 'spip_gamumails', 'slug=mail_inscription')) {
|
||||||
|
$envoyer_gamumail = charger_fonction('envoyer_gamumail', 'inc');
|
||||||
|
$envoyer_gamumail('mail_inscription', $id_auteur, ['args' => $options]);
|
||||||
|
}
|
||||||
|
else {
|
||||||
$contexte = sql_fetsel('*', 'spip_auteurs', 'id_auteur='.intval($id_auteur));
|
$contexte = sql_fetsel('*', 'spip_auteurs', 'id_auteur='.intval($id_auteur));
|
||||||
if (isset($options['pass'])) {
|
if (isset($options['pass'])) {
|
||||||
$contexte['pass'] = $options['pass'];
|
$contexte['pass'] = $options['pass'];
|
||||||
|
@ -26,3 +30,4 @@ function inc_comptespip_mail_inscription_dist(int $id_auteur, array $options = [
|
||||||
include_spip('inc/notifications');
|
include_spip('inc/notifications');
|
||||||
notifications_envoyer_mails($mail_complet, $message, $sujet);
|
notifications_envoyer_mails($mail_complet, $message, $sujet);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue