Manual:Hooks/userCan

Details

 * $title : Title being checked
 * $user : Current user
 * $action : Action being checked
 * $result : Reference to result

To set a result, set the value of $result, e.g. to indicate that the user should not be allowed to perform the specified action, set $result to false.

Return true from the hook function to continue the hook chain. This allows other functions subscribed to the hook to set their own value. Returning false will halt hook chain processing. In general, if setting $result to false, one should also return false; if setting $result</tt> to true</tt>, or not setting a value, one should return true</tt> to allow other extensions to validate the action.

If a result is returned from an extension in the hook chain, internal checks are not performed. If no result is returned, i.e. $result</tt> remains null</tt>, then the rest of Title::userCan</tt> is run, and internal checks are performed.

Permutations
For convenience, a table is provided below which summarises the possible permutations of $result</tt> and the return value, and details the consequences.