Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.2.x will end 22 April 2024 (12 months).
  • Bug fixes for security issues in 4.2.x will end 7 October 2024 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.1.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.