Rob Church wrote:
Hooks return true or false to indicate whether or not further processing should continue. Where a boolean result is also needed, a hook can provide this using, e.g. a variable passed by reference, as is the case here.
Yes, I know.
Rob Church wrote:
To indicate that a password is not valid, you would set $result to false and return false; returning false causes the hook chain to be aborted (so any additional methods subscribed to that hook won't override the $result) and indicates that MediaWiki shouldn't perform internal checks to determine whether or not the password is valid; the value of $result is then used.
I suppose if you have multiple extensions built on that hook, it would be most secure to skip all the other hooks in case they are not well written. Though those hooks should never make a 'false' value 'true' anyway.