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