diff --git a/auth/mnet/auth.php b/auth/mnet/auth.php index b3b22f534b1..160adfdb682 100644 --- a/auth/mnet/auth.php +++ b/auth/mnet/auth.php @@ -716,9 +716,7 @@ class auth_plugin_mnet extends auth_plugin_base { foreach($superArray as $subArray) { $subArray = array_values($subArray); - $instring = "('".implode("', '",$subArray)."')"; - $query = "select id, session_id, username from {mnet_session} where username in $instring"; - $results = $DB->get_records_sql($query); + $results = $DB->get_records_list('mnet_session', 'username', $subArray, '', 'id, session_id, username'); if ($results == false) { // We seem to have a username that breaks our query: