Example #1
0
 public function indexAction()
 {
     $model = new ProfileModel();
     $uriOptions = Request::getUriOptions();
     $this->view->discover = $model->checkDiscoverRecord(Request::getParam('user')->id);
     if (Request::getParam('user')->id == $uriOptions[0]) {
         $user = Request::getParam('user');
     } else {
         $user = $model->getUserByID($uriOptions[0]);
     }
     if (!$user) {
         error404();
     }
     if (Request::getParam('user')->id != $user->id) {
         $this->view->friend = $model->friendsStatus(Request::getParam('user')->id, $user->id);
     }
     if (Request::getParam('user')->id != $user->id && !$model->getMatchesByUP(Request::getParam('user')->id, $user->id)->id) {
         $this->view->challenge = true;
     }
     $this->view->langPars = true;
     $this->view->profile = $user;
     $this->view->steamtradelink = $model->getTradeLink($user->id);
     $this->view->country = $model->getCountryByCode($user->country);
     $this->view->ref_count = $model->countRefByID($user->id);
     $this->view->title = $user->nickname;
 }