diff --git a/auth/mnet/auth.php b/auth/mnet/auth.php index 27cf5d708a8..d12ef16dd3c 100644 --- a/auth/mnet/auth.php +++ b/auth/mnet/auth.php @@ -710,9 +710,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: