Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

Contains upgrade and install functions for the social profile fields.

Copyright: 2020 Bas Brands <bas@moodle.com>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 196 lines (7 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 5 functions


Functions that are not part of a class:

user_profile_social_create_info_category()   X-Ref
Create the default category for custom profile fields if it does not exist yet.

return: int Category ID for social user profile category.

user_profile_social_moveto_profilefield($social)   X-Ref
Called on upgrade to create new profile fields based on the old user table columns
for icq, msn, aim, skype and url.

param: string $social Social profile field.

user_profile_social_create_profilefield($social)   X-Ref
Create an new custom social profile field if it does not exist

param: string $social Social profile field.
return: object DB record or social profield field.

user_profile_social_update_module_availability()   X-Ref
Update the module availability configuration for all course modules


user_profile_social_update_availability_structure(&$structure)   X-Ref
Loop through the availability info and change all move standard profile
fields for icq, skype, aim, yahoo, msn and url to be custom profile fields.

param: mixed $structure The availability object.