Modification de la fonctions save pour l'enregistrement des preferences avec les fonctions Zends

This commit is contained in:
Damien LASSERRE 2012-01-11 10:48:22 +00:00
parent 64102a3b52
commit 0bf2669e18

View File

@ -9,9 +9,9 @@ class PreferencesController extends Zend_Controller_Action
$fields = $this->getRequest()->getParam('fields');
$auth = Zend_Auth::getInstance();
$user = $auth->getIdentity();
$db = Zend_Registry::get('db');
$prefsModel = new Application_Model_Prefs($db);
$data = array(
'login' => $user->username,
@ -24,7 +24,6 @@ class PreferencesController extends Zend_Controller_Action
} else {
$prefsModel->insert($data);
}
$this->_redirect('./');
}