MDL-28452 core_user: migrate social profile fields

Create a new profile field type, move all existing content of the fields
'icq', 'skype', 'aim', 'yahoo', 'msn' and 'url' in the mdl_user table to
theses new profile fields if needed.

AMOS BEGIN
MOV [aimid,core],[aimid,courseimage,profilefield_social]
MOV [yahooid,core],[yahooid,profilefield_social]
MOV [skypeid,core],[skypeid,profilefield_social]
MOV [icqnumber,core],[icqnumber,profilefield_social]
MOV [msnid,core],[msnid,profilefield_social]
MOV [webpage,core],[webpage,profilefield_social]
AMOS END
This commit is contained in:
Bas Brands
2021-04-21 11:24:34 +02:00
parent 9600becce3
commit 37f26f211f
54 changed files with 1338 additions and 537 deletions
-23
View File
@@ -394,29 +394,6 @@ function useredit_shared_definition(&$mform, $editoroptions, $filemanageroptions
// Moodle optional fields.
$mform->addElement('header', 'moodle_optional', get_string('optional', 'form'));
$mform->addElement('text', 'url', get_string('webpage'), 'maxlength="255" size="50"');
$mform->setType('url', core_user::get_property_type('url'));
$mform->addElement('text', 'icq', get_string('icqnumber'), 'maxlength="15" size="25"');
$mform->setType('icq', core_user::get_property_type('icq'));
$mform->setForceLtr('icq');
$mform->addElement('text', 'skype', get_string('skypeid'), 'maxlength="50" size="25"');
$mform->setType('skype', core_user::get_property_type('skype'));
$mform->setForceLtr('skype');
$mform->addElement('text', 'aim', get_string('aimid'), 'maxlength="50" size="25"');
$mform->setType('aim', core_user::get_property_type('aim'));
$mform->setForceLtr('aim');
$mform->addElement('text', 'yahoo', get_string('yahooid'), 'maxlength="50" size="25"');
$mform->setType('yahoo', core_user::get_property_type('yahoo'));
$mform->setForceLtr('yahoo');
$mform->addElement('text', 'msn', get_string('msnid'), 'maxlength="50" size="25"');
$mform->setType('msn', core_user::get_property_type('msn'));
$mform->setForceLtr('msn');
$mform->addElement('text', 'idnumber', get_string('idnumber'), 'maxlength="255" size="25"');
$mform->setType('idnumber', core_user::get_property_type('idnumber'));