mirror of
https://github.com/moparisthebest/user_sql
synced 2024-08-13 16:53:48 -04:00
Fix cache problems with newer ownCloud versions
This commit is contained in:
parent
e2773e06ae
commit
700fb00c71
10
user_sql.php
10
user_sql.php
@ -47,8 +47,8 @@ class OC_USER_SQL extends OC_User_Backend implements OC_User_Interface {
|
|||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->db_conn = false;
|
$this->db_conn = false;
|
||||||
$this->cache = \OC_Cache::getGlobalCache();
|
$this->cache = \OC\Cache::getGlobalCache();
|
||||||
$this->sql_host = OCP\Config::getAppValue('user_sql', 'sql_host', '');
|
$this->sql_host = OCP\Config::getAppValue('user_sql', 'sql_host', '');
|
||||||
$this->sql_username = OCP\Config::getAppValue('user_sql', 'sql_user', '');
|
$this->sql_username = OCP\Config::getAppValue('user_sql', 'sql_user', '');
|
||||||
$this->sql_database = OCP\Config::getAppValue('user_sql', 'sql_database', '');
|
$this->sql_database = OCP\Config::getAppValue('user_sql', 'sql_database', '');
|
||||||
$this->sql_password = OCP\Config::getAppValue('user_sql', 'sql_password', '');
|
$this->sql_password = OCP\Config::getAppValue('user_sql', 'sql_password', '');
|
||||||
@ -277,9 +277,9 @@ class OC_USER_SQL extends OC_User_Backend implements OC_User_Interface {
|
|||||||
public function userExists($uid)
|
public function userExists($uid)
|
||||||
{
|
{
|
||||||
|
|
||||||
$cacheKey = 'sql_user_exists_' . $uid;
|
$cacheKey = 'sql_user_exists_' . $uid;
|
||||||
$cacheVal = $this->cache->get($cacheKey);
|
$cacheVal = $this->cache->get($cacheKey);
|
||||||
if(! is_null($cacheVal) ) return (bool) $cacheVal;
|
if(!is_null($cacheVal)) return (bool)$cacheVal;
|
||||||
|
|
||||||
OC_Log::write('OC_USER_SQL', "Entering userExists() for UID: $uid", OC_Log::DEBUG);
|
OC_Log::write('OC_USER_SQL', "Entering userExists() for UID: $uid", OC_Log::DEBUG);
|
||||||
if(!$this->db_conn)
|
if(!$this->db_conn)
|
||||||
|
Loading…
Reference in New Issue
Block a user