MDL-16286 - replace get_records_sql with more generic get_records

Author: Peter Bulmer <peter.bulmer@catalyst.net.nz>
This commit is contained in:
peterbulmer 2008-09-07 03:22:34 +00:00
parent a01ee3136f
commit 1c85006caf

View File

@ -1084,14 +1084,8 @@ class auth_plugin_mnet extends auth_plugin_base {
$userid = $DB->get_field('user', 'id', array('mnethostid'=>$CFG->mnet_localhost_id, 'username'=>$username));
$returnstring = '';
$sql = "
select
*
from
{mnet_session} s
where
s.userid = ? AND
s.useragent = ?";
$mnetsessions = $DB->get_records('mnet_session', array('userid' => $userid, 'useragent' => $useragent));
// If we are being executed from a remote machine (client) we don't have
// to kill the moodle session on that machine.
@ -1101,8 +1095,6 @@ class auth_plugin_mnet extends auth_plugin_base {
$excludeid = -1;
}
$mnetsessions = $DB->get_records_sql($sql, array($userid, $useragent));
if (false == $mnetsessions) {
$returnstring .= "Could find no remote sessions\n$sql\n";
$mnetsessions = array();