Commit 50105b85 authored by Brett Wilkins's avatar Brett Wilkins

MaharaAuthPlugin: fetch object rather than row

parent cf1be0e1
...@@ -138,7 +138,7 @@ class MaharaAuthPlugin extends AuthPlugin { ...@@ -138,7 +138,7 @@ class MaharaAuthPlugin extends AuthPlugin {
$db = $this->getDatabase(); $db = $this->getDatabase();
$sql = "SELECT * FROM ".$this->prefix."usr where LOWER(username) = LOWER('".$user->mName."')"; $sql = "SELECT * FROM ".$this->prefix."usr where LOWER(username) = LOWER('".$user->mName."')";
$res = $db->query($sql); $res = $db->query($sql);
$val = $db->fetchRow($res); $val = $db->fetchObject($res);
$db->close(); $db->close();
$user->setOption('nickname',$val->username); $user->setOption('nickname',$val->username);
$user->setEmail($val->email); $user->setEmail($val->email);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment