-
Improvement
-
Resolution: Fixed
-
Minor
-
3.6
-
MOODLE_36_STABLE
-
MOODLE_36_STABLE
-
MDL-62273-master -
At present, user profile access in Moodle is controlled using the user_can_view_profile function. This applies a number of restrictions (for example, you must normally be enrolled on the same course, unless you have certain capabilities).
There are cases where, in a specific institution, it might be necessary to override this behaviour - either to prevent view of a user's profile, or occasionally to allow it when it would normally be prevented.
I propose implementing a new callback control_view_profile which would allow any plugin to alter this permission according to custom logic.
Most likely this would be implemented by a local plugin at the institution that wants to apply additional profile access rules.