Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在创建一个 moodle 本地插件,我需要将当前用户的个人资料页面显示为我的页面的一部分,然后添加我的数据。 是否有任何 API 可以为我提供个人资料页面(带有所有其他字段),以便我能够在我的页面中显示它?
您可以使用全局变量 $USER。您将在 $USER 中找到当前登录用户的所有记录并根据您的要求显示。