Get the current line only when we have a result
This commit is contained in:
parent
2e6ef7b72f
commit
9d7c856846
@ -317,11 +317,11 @@ class DashboardController extends Zend_Controller_Action
|
||||
|
||||
//Read prefs table to load actual config
|
||||
$prefsM = new Application_Model_Prefs();
|
||||
$userPrefs = $prefsM->find($user->username)->current();
|
||||
$userPrefs = $prefsM->find($user->username);
|
||||
|
||||
$data = array('interface'=>array(),'filter'=>array());
|
||||
if ($userPrefs) {
|
||||
$data = json_decode($userPrefs->json, true);
|
||||
$data = json_decode($userPrefs->current()->json, true);
|
||||
} else {
|
||||
$prefsM->insert(array('login'=>$user->username, 'json'=>json_encode($data)));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user