Coding with SPIP 3.0
SPIP3.0 Technical Documentation

> > > > Processes in the autoriser() function

Processes in the autoriser() function

SPIP’s default authorisations are made using the ecrire/inc/autoriser.php file.

When SPIP is requested for an autoriser($faire, $type) type authorisation, it goes to look for a function to handle this requested authorisation. It looks for the named function in the following order:

  • autoriser_$type_$faire,
  • autoriser_$type,
  • autoriser_$faire,
  • autoriser_defaut,
  • and then the same list with the _dist suffix attached.


  1. autoriser('modifier','article',$id_article);

Will return the first function found and execute it. This being:

  1. function autoriser_article_modifier_dist($faire, $type, $id, $qui, $opt){
  2. ...
  3. }


The function is passed the same parameters as the autoriser() function. Inside it, $qui is passed the current author if an author was not passed as an argument in the call to autoriser().

  • Author :
  • Published :
  • Updated : 12/05/17
  • Translations : English, français