public function display($cachable = false, $urlparams = false) { if ($auth = UserNotesHelper::userAuth($this->uid)) { if ($auth > 1 && !file_exists(UserNotesHelper::userDataPath())) { $this->input->set('view', 'startup'); } return parent::display($cachable, $urlparams); } else { $this->setRedirect('index.php'); } }
protected function _prepareDocument() { if ($this->userID) { if (UserNotesHelper::userAuth($this->userID) > 1) { if ($this->item && $this->item->checked_out && $this->item->checked_out != $this->userID) { $this->footMsg = 'Checked out by ' . JFactory::getUser($this->item->checked_out)->get('username') . '.'; } else { $this->access = 15; } } } // Get a notes instance identifier for ajax/upload $this->notesID = UserNotesHelper::getInstanceID(); // $this->attached = @unserialize($this->item->attached); if (isset($this->item->attached)) { $this->attached = $this->item->attached; } }