public function itemAction() { $vote = Red_User::isLoggedIn(); if ($vote) { $this->_helper->redirector('vote', 'content'); } $content_id = $this->getRequest()->getParam('content_id'); $this->view->content = Red_Content::getContent($content_id); $this->view->user = Red_User::selectProfile($this->view->content['user_id']); }
public function profileAction() { $vote = Red_User::isLoggedIn(); if ($vote) { $this->_helper->redirector('vote', 'content'); } $user_id = $this->getRequest()->getParam('user'); if (!$user_id) { $user_id = $_SESSION['user']['user_id']; } $this->view->contents = Red_Content::getContents(null, 'date_added', $user_id); $this->view->user = Red_User::selectProfile($user_id); }