odea/application/controllers/PrefsController.php

16 lines
369 B
PHP
Raw Normal View History

<?php
class PrefsController extends Zend_Controller_Action
{
public function indexAction()
{
2012-01-06 12:43:52 +01:00
$auth = Zend_Auth::getInstance();
$user = $auth->getIdentity();
$db = Zend_Registry::get('db');
$prefs = new Application_Model_Prefs($db);
$sql = $prefs->select()->where('login = ?', $user->username);
$this->view->entries = $prefs->fetchAll($sql);
}
}