Ejemplo n.º 1
0
 function display($tpl = null)
 {
     // Initialise variables.
     $app = JFactory::getApplication();
     $user = JFactory::getUser();
     $userId = $user->get('id');
     $dispatcher = JDispatcher::getInstance();
     $this->print = JRequest::getBool('print');
     $this->state = $this->get('State');
     $this->user = $user;
     $this->user = ideary::getUserInfoById($this->user->id);
     $userextra = Ideary::getExtraUserData($_GET["id"]);
     $this->assignRef('userextra', $userextra);
     $this->userDatafinal = Ideary::getuserData($this->user->id);
     $this->userDatafinal = $this->userDatafinal[0];
     $this->userExtraData = Ideary::getExtraUserData($this->user->id);
     $this->period = isset($_POST['period']) ? $_POST['period'] : 'LAST-WEEK';
     $this->messages = Ideary::getUserMessages($this->user->id);
     $user_followers = Ideary::getUserFollowers($this->user->id);
     $followers = array();
     foreach ($user_followers as $follower) {
         $followers[] = $follower->follower_id;
     }
     $this->user_followers = $followers;
     $this->messages_sent = Ideary::getUserMessagesSent($this->user->id);
     $this->inbox_messages = Ideary::getMessagesOfFollowedUsersByUserId($this->user->id);
     $this->unknown_users_messages = Ideary::getMessagesOfNoFollowedUsersByUserId($this->user->id);
     $this->sent_messages = Ideary::getMessagesSentByUserId($this->user->id);
     Ideary::setAllMailsAsReaded($this->user->id);
     //$this->_prepareDocument();
     parent::display($tpl);
 }