Skip to content

Commit

Permalink
MDL-23600 MNet: do not rely on existing user record with ID 1
Browse files Browse the repository at this point in the history
  • Loading branch information
mudrd8mz committed Aug 8, 2010
1 parent 50e798c commit 4378e6a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mnet/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4378e6a

Please sign in to comment.