compteSPIP/comptespip_autorisations.php

34 lines
644 B
PHP

<?php
/**
* Définit les autorisations du plugin GamuCompte
*
* @plugin GamuCompte
* @copyright 2020
* @author tofulm
* @licence GNU/GPL
* @package SPIP\Gamucompte\Autorisations
*/
if (!defined('_ECRIRE_INC_VERSION')) {
return;
}
/**
* Fonction d'appel pour le pipeline
* @pipeline autoriser */
function comptespip_autoriser() {
}
/*
* surcharge de la fonction native de SPIP
* return true si le champ statut de la config du plugin est renseigné
*/
function autoriser_inscrireauteur($faire, $quoi, $id, $qui, $opt) {
$mode = lire_config('comptespip/statut');
if ($mode) {
return true;
}
return false;
}