From: Thiemo Mättig Date: Thu, 11 Jan 2018 13:21:58 +0000 (+0100) Subject: Update UserSaveOptions/UserSaveSettings hook descriptions X-Git-Tag: 1.31.0-rc.0~855 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/supprimer.php?a=commitdiff_plain;h=383e9013f6567614fe000073fab8270c5e84ef17;p=lhc%2Fweb%2Fwiklou.git Update UserSaveOptions/UserSaveSettings hook descriptions I already updated https://www.mediawiki.org/wiki/Manual:Hooks/UserSaveOptions https://www.mediawiki.org/wiki/Manual:Hooks/UserSaveSettings accordingly. Change-Id: I492f83aa8acb6521f3e175fdbf507a7e44491ca2 --- diff --git a/docs/hooks.txt b/docs/hooks.txt index c5bccaf3bf..d497884236 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -3809,12 +3809,16 @@ After a user's group memberships are changed. $add: Array of strings corresponding to groups added $remove: Array of strings corresponding to groups removed -'UserSaveOptions': Called just before saving user preferences/options. -$user: User object -&$options: Options, modifiable - -'UserSaveSettings': Called when saving user settings. -$user: User object +'UserSaveOptions': Called just before saving user preferences. Hook handlers can either add or +manipulate options, or reset one back to it's default to block changing it. Hook handlers are also +allowed to abort the process by returning false, e.g. to save to a global profile instead. Compare +to the UserSaveSettings hook, which is called after the preferences have been saved. +$user: The User for which the options are going to be saved +&$options: The users options as an associative array, modifiable + +'UserSaveSettings': Called directly after user preferences (user_properties in the database) have +been saved. Compare to the UserSaveOptions hook, which is called before. +$user: The User for which the options have been saved 'UserSetCookies': DEPRECATED! If you're trying to replace core session cookie handling, you want to create a subclass of MediaWiki\Session\CookieSessionProvider