jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/403662 )

Change subject: Update UserSaveOptions/UserSaveSettings hook descriptions
......................................................................


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
---
M docs/hooks.txt
1 file changed, 9 insertions(+), 5 deletions(-)

Approvals:
  Umherirrender: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/docs/hooks.txt b/docs/hooks.txt
index c5bccaf..d497884 100644
--- a/docs/hooks.txt
+++ b/docs/hooks.txt
@@ -3809,12 +3809,16 @@
 $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
+'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 when saving user settings.
-$user: User object
+'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

-- 
To view, visit https://gerrit.wikimedia.org/r/403662
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I492f83aa8acb6521f3e175fdbf507a7e44491ca2
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Thiemo Kreuz (WMDE) <[email protected]>
Gerrit-Reviewer: Umherirrender <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to