MDL-64049 core: Cache prefs for current user
authorAndrew Nicols <andrew@nicols.co.uk>
Fri, 16 Nov 2018 05:58:54 +0000 (13:58 +0800)
committerAndrew Nicols <andrew@nicols.co.uk>
Mon, 19 Nov 2018 03:23:59 +0000 (11:23 +0800)
commit8cba8d1a586c7f69cad1239309ebbd3b20f6a681
treea310ce6ada01d848aad4c51b6f217998ad614dfd
parent01acb1ea90fe448c87c8e7d3bdca69219e6f04a3
MDL-64049 core: Cache prefs for current user

We were already caching these preferences when a user object is provided
to get_user_preferences, or when $USER is provided.

This changee swaps get_user_preferences to use the global USER object
when the USER->id matches the userid supplied to the function.
lib/moodlelib.php
repository/flickr/tests/privacy_test.php