mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
MDL-16286 - replace get_records_sql with more generic get_records
Author: Peter Bulmer <peter.bulmer@catalyst.net.nz>
This commit is contained in:
parent
a01ee3136f
commit
1c85006caf
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user