maj du slug créé si Gamumail est présent. Débogage de l'envoi du mail d'inscription avec Gamumail.
This commit is contained in:
parent
884bab15fc
commit
a07579bc39
5 changed files with 16 additions and 10 deletions
|
@ -33,11 +33,14 @@ function comptespip_upgrade($nom_meta_base_version, $version_cible) {
|
|||
maj_plugin($nom_meta_base_version, $version_cible, $maj);
|
||||
}
|
||||
|
||||
/**
|
||||
* si Gamumail est actif, créer le slug pour le mail d'inscription afin de donner la main aux admins pour son contenu
|
||||
**/
|
||||
function comptespip_creer_slug($nom_slug, $options = []) {
|
||||
if (test_plugin_actif('gamumail')) {
|
||||
$cree_slug = charger_fonction('creer_slug', 'action');
|
||||
$message = _T('form_forum_message_auto')."\r\n"."\r\n"._T('form_forum_bonjour', array('nom' => '@@nom_adherent@@'))."\r\n";
|
||||
$message .= _T('comptespip:confirmation_creation_compte', array('url_site' => lire_config('adresse_site')));
|
||||
$message = _T('form_forum_message_auto')."\r\n"."\r\n"._T('form_forum_bonjour', array('nom' => '@@nom@@'))."\r\n"."\r\n";
|
||||
$message .= _T('comptespip:confirmation_creation_compte', array('url_site' => '@@url_site@@'));
|
||||
$set = [
|
||||
'titre' => _T('comptespip:mail_inscription'),
|
||||
'sujet' => '['.lire_config('nom_site').'] '._T('comptespip:creation_compte'),
|
||||
|
|
|
@ -24,3 +24,4 @@ function comptespip_insert_head_css($flux){
|
|||
$flux .= '<link rel="stylesheet" href="' . timestamp(find_in_path('css/comptespip.css')) . '" type="text/css" />' . "\n";
|
||||
return $flux;
|
||||
}
|
||||
|
||||
|
|
|
@ -169,11 +169,6 @@ function formulaires_editer_compte_spip_traiter_dist($id_auteur = 'new', $redir
|
|||
'data' => $set
|
||||
)
|
||||
);
|
||||
|
||||
/* envoyer le mail d'inscription */
|
||||
$envoyer_mail = charger_fonction('comptespip_mail_inscription','inc');
|
||||
$envoyer_mail($id_auteur);
|
||||
|
||||
} else {
|
||||
if ($password) {
|
||||
// si le password fait moins de 50 caracteres, on peut penser que le javascript n'a pas fonctionné, on crypte alors le mdp
|
||||
|
@ -219,6 +214,12 @@ function formulaires_editer_compte_spip_traiter_dist($id_auteur = 'new', $redir
|
|||
}
|
||||
}
|
||||
|
||||
// envoyer le mail d'inscription si nouveau compte
|
||||
if (!$update) {
|
||||
$envoyer_mail = charger_fonction('comptespip_mail_inscription','inc');
|
||||
$envoyer_mail($id_auteur);
|
||||
}
|
||||
|
||||
if ($update and lire_config('comptespip/modif_logo_auteur')) {
|
||||
comptespip_save_logo_auteur($id_auteur);
|
||||
}
|
||||
|
|
|
@ -13,9 +13,11 @@ if (!defined('_ECRIRE_INC_VERSION')){
|
|||
* @return 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')) {
|
||||
$options['debug'] = true;
|
||||
|
||||
if (test_plugin_actif('gamumail') and sql_countsel('spip_gamumails', 'slug="mail_inscription"')) {
|
||||
$envoyer_gamumail = charger_fonction('envoyer_gamumail', 'inc');
|
||||
$envoyer_gamumail('mail_inscription', $id_auteur, ['args' => $options]);
|
||||
$envoyer_gamumail('mail_inscription', $id_auteur, $options);
|
||||
}
|
||||
else {
|
||||
$contexte = sql_fetsel('*', 'spip_auteurs', 'id_auteur='.intval($id_auteur));
|
||||
|
|
|
@ -25,5 +25,4 @@
|
|||
<pipeline nom="comptespip_pre_login" action="" />
|
||||
<pipeline nom="comptespip_post_traiter" action="" />
|
||||
|
||||
|
||||
</paquet>
|
||||
|
|
Loading…
Add table
Reference in a new issue