Translations:Manual:Hooks/getUserPermissionsErrors/8/en

$result can be returned as a single error message key (string), or an array of error message keys when multiple messages are needed (although it seems to take an array as one message key with parameters?).