Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 3.1.5, 3.2.2
-
Component/s: Libraries
-
Testing Instructions:
-
Affected Branches:MOODLE_31_STABLE, MOODLE_32_STABLE
-
Fixed Branches:MOODLE_31_STABLE, MOODLE_32_STABLE
-
Pull from Repository:
-
Pull Master Branch:
-
Pull Master Diff URL:
Description
With (un)set_user_preference, you can either pass a $user object, or a $userid, to say which user's preference to set. (If not passed, it defaults to $USER).
Once the preference is set (or unset), it updates the cache in $user->preference cache.
The case that is missed is that if you pass $USER->id to the function as an integer, then it dose not updated the cache in $USER. I think it should, and it took me a while to debug. Therefore, I am going to make a patch.