Extension:PluggableAuth/Hooks/PluggableAuthUserAuthorization/fr

From Linux Web Expert

PluggableAuthUserAuthorization
Available from version 1.0 (Gerrit change 170132)
appelé pour déterminer si l'utilisateur est autorisé à se connecter au wiki
Define function:
public static function onPluggableAuthUserAuthorization( UserIdentity $user, bool &$authorized ) { ... }
Attach hook:
$wgHooks['PluggableAuthUserAuthorization'][] = 'MyExtensionHooks::onPluggableAuthUserAuthorization';
Called from:File(s): PluggableAuth / includes/PluggableAuthLogin.php
Function(s): execute

For more information about attaching hooks, see Accroches .
For examples of other extensions using this hook, see Category:PluggableAuthUserAuthorization extensions/fr.

Détails

  • UserIdentity $user - l'objet User
  • bool &$authorized - Valeur de retour booléenne (true si autorisé, false dans le cas contraire)

The possible return values for the handler are defined in Manual:Hooks. In particular, if there has not been an error, the hook function should return no value or null to allow other handlers to run or it should return false to prevent further handlers from running. It is, therefore, possible that the value of $authorized passed in may be false from a previous handler invocation that returned no value or null. The handler may choose to override that value or to leave it unchanged.