Manual:Hooks/getUserPermissionsErrorsExpensive

Details

 * $title: Title object being checked against
 * $user : Current user object
 * $action: Action being checked
 * &$result: User permissions error to add, in a format understood by Title::resultToError like . If none, return true. Otherwise, the error message is passed all the way to Title::userCan and then used in whatever way the calling code wants.

Differences from getUserPermissionsErrors
Both hooks are typically run when checking for proper permissions in. When it is desireable to skip potentially expensive cascading permission checks, only getUserPermissionsErrors is run. This behavior is suitable for nonessential UI controls in common cases, but not for functional access control. This behavior may provide false positives, but should never provide a false negative.