Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.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: 1 time
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.