Commit 3e70fdd0 authored by Brett Wilkins's avatar Brett Wilkins

MaharaAuthPlugin: fixing some PHP warnings

parent 1cf02eae
...@@ -136,7 +136,7 @@ class MaharaAuthPlugin extends AuthPlugin { ...@@ -136,7 +136,7 @@ class MaharaAuthPlugin extends AuthPlugin {
public function updateUser( &$user ) { public function updateUser( &$user ) {
$db = $this->getDatabase(); $db = $this->getDatabase();
$sql = "SELECT * FROM ".$this->prefix."usr where LOWER(username) = LOWER('".$user->username."')"; $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->fetchRow($res);
$db->close(); $db->close();
...@@ -259,7 +259,7 @@ class MaharaAuthPlugin extends AuthPlugin { ...@@ -259,7 +259,7 @@ class MaharaAuthPlugin extends AuthPlugin {
* @param $autocreate bool True if user is being autocreated on login * @param $autocreate bool True if user is being autocreated on login
*/ */
public function initUser( &$user, $autocreate=false ) { public function initUser( &$user, $autocreate=false ) {
$username = strtolower($username); $username = strtolower($user->mName);
$db = $this->getDatabase(); $db = $this->getDatabase();
$sql = "SELECT * FROM ".$this->prefix."usr where LOWER(username) = '".$username."'"; $sql = "SELECT * FROM ".$this->prefix."usr where LOWER(username) = '".$username."'";
$res = $db->query($sql); $res = $db->query($sql);
......
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