mirror of
https://github.com/moparisthebest/user_sql
synced 2024-08-13 16:53:48 -04:00
use SET NAMES UTF8 rather than unconditional utf8_encode
This commit is contained in:
parent
cb890440ba
commit
ab89843609
@ -75,6 +75,7 @@ class OC_USER_SQL extends OC_User_Backend implements OC_User_Interface
|
||||
try
|
||||
{
|
||||
$this -> db = new PDO($dsn, $this -> sql_username, $this -> sql_password);
|
||||
$this -> db -> query("SET NAMES UTF8");
|
||||
$this -> db_conn = true;
|
||||
} catch (PDOException $e)
|
||||
{
|
||||
@ -422,7 +423,7 @@ class OC_USER_SQL extends OC_User_Backend implements OC_User_Interface
|
||||
} else
|
||||
{
|
||||
OC_Log::write('OC_USER_SQL', "User exists, return true", OC_Log::DEBUG);
|
||||
$displayName = utf8_encode($row[$this -> sql_column_displayname]);
|
||||
$displayName = $row[$this -> sql_column_displayname];
|
||||
return $displayName; ;
|
||||
}
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user