mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-23600 MNet: do not rely on existing user record with ID 1
This commit is contained in:
parent
50e798c8a4
commit
4378e6a2ff
1 changed files with 2 additions and 2 deletions
|
@ -633,8 +633,8 @@ function mnet_profile_field_options() {
|
||||||
'picture',
|
'picture',
|
||||||
);
|
);
|
||||||
|
|
||||||
// get a random user field from the database to pull the fields off
|
// get a random user record from the database to pull the fields off
|
||||||
$randomuser = $DB->get_record('user', array('id' => 1));
|
$randomuser = $DB->get_record('user', array(), '*', IGNORE_MULTIPLE);
|
||||||
foreach ($randomuser as $key => $discard) {
|
foreach ($randomuser as $key => $discard) {
|
||||||
if (in_array($key, $excludes) || in_array($key, $forced)) {
|
if (in_array($key, $excludes) || in_array($key, $forced)) {
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue