mirror of
https://github.com/moodle/moodle.git
synced 2025-01-30 03:58:34 +01:00
MDL-47689 user: Add duplicate field check to avoid oracle db error.
This commit is contained in:
parent
7a811fb63a
commit
368f0bf8f6
@ -410,9 +410,9 @@ list($esql, $params) = get_enrolled_sql($context, null, $currentgroup, true);
|
||||
$joins = array("FROM {user} u");
|
||||
$wheres = array();
|
||||
|
||||
$mainuserfields = user_picture::fields('u', array('username', 'email', 'city', 'country', 'lang', 'timezone', 'maildisplay'));
|
||||
$alreadyretrievedfields = explode(',', $mainuserfields);
|
||||
$extrasql = get_extra_user_fields_sql($context, 'u', '', $alreadyretrievedfields);
|
||||
$userfields = array('username', 'email', 'city', 'country', 'lang', 'timezone', 'maildisplay');
|
||||
$mainuserfields = user_picture::fields('u', $userfields);
|
||||
$extrasql = get_extra_user_fields_sql($context, 'u', '', $userfields);
|
||||
|
||||
if ($isfrontpage) {
|
||||
$select = "SELECT $mainuserfields, u.lastaccess$extrasql";
|
||||
|
Loading…
x
Reference in New Issue
Block a user