CC-5555: Fix user preferences logic in preferences cache
* Fixes stream settings not dislaying
This commit is contained in:
parent
f695d7b895
commit
2c7db0e83c
1 changed files with 3 additions and 4 deletions
|
@ -131,7 +131,7 @@ class Application_Model_Preference
|
|||
if ($isUserValue && is_null($userId)) {
|
||||
throw new Exception("User id can't be null for a user preference.");
|
||||
}
|
||||
|
||||
|
||||
$res = $cache->fetch($key, $isUserValue, $userId);
|
||||
if ($res !== false) {
|
||||
//Logging::info("returning {$key} {$userId} from cache. = {$res}");
|
||||
|
@ -146,8 +146,7 @@ class Application_Model_Preference
|
|||
$paramMap[':key'] = $key;
|
||||
|
||||
//For user specific preference, check if id matches as well
|
||||
if (isset($userId)) {
|
||||
|
||||
if ($isUserValue) {
|
||||
$sql .= " AND subjid = :id";
|
||||
$paramMap[':id'] = $userId;
|
||||
}
|
||||
|
@ -166,7 +165,7 @@ class Application_Model_Preference
|
|||
$paramMap[':key'] = $key;
|
||||
|
||||
//For user specific preference, check if id matches as well
|
||||
if (isset($userId)) {
|
||||
if ($isUserValue) {
|
||||
$sql .= " AND subjid = :id";
|
||||
$paramMap[':id'] = $userId;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue