Manual talk:Hooks/userCan

From mediawiki.org

Important suggestion[edit]

Unfortunately, this hook is only called from Title.php so only actions which act on a specific page can be handled with this hook. MediaWiki really needs a hook called from User->isAllowed(). Then other actions like userrights and such could be caught as well.

Just curious. Shouldn't this be expanded to include moving, protecting, and deleting pages as well? --Michael Reynolds 04:39, 22 March 2007 (UTC)Reply

php 8.0.27 and mediawiki 1.39.3 => error "Use of userCan hook" deprecated[edit]

I get this error listed under the debug-section. Is it "normal" and (in microsoft-wording) "safe to ignore"?

  • [error] [ZHi1Ro28N0gdP54Cmk0EWwAAAAs] /mediawiki/index.php?title=Spezial%3ABenutzer&username=&group=sysop&wpsubmit=&wpFormIdentifier=mw-listusers-form&limit=50 PHP Deprecated: Use of userCan hook (used in AccessControlHooks::onUserCan) was deprecated in MediaWiki 1.37. [Called from MediaWiki\HookContainer\HookContainer::run

UweAtwork (talk) 15:27, 1 June 2023 (UTC)Reply