-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
4.1.14
-
None
-
MOODLE_401_STABLE
Upgrading from 3.9 to 4.1 on an Oracle database causes the loss of all social fields:
- Web URL
- ICQ
- Skype
- AIM
- Yahoo
- MSN
This issue occurs due to the query executed in user_profile_social_moveto_profilefield on the Oracle database, which fails to copy social fields into the new custom fields.
In user_profile_social_moveto_profilefield, to retrieve users that require new custom fields derived from the old social fields in the user table, the following query is executed:
$users = $DB->get_records_select('user', "$social IS NOT NULL AND $social != ''");
The condition != '' is incorrect on Oracle databases because empty fields always contain a blank character (' '), causing $users to always be empty."