ErrorException

Not Found

/var/www/happymoments.ua/web/protected/controllers/UserController.php(56)

44     public function actionView($id) {
45         $this->is_bannerView = true;
46         $user = Users::model()->with(['occupation', 'portfolio', 'flo', 'show'])->findByPk($id, 't.active=1 and t.deleted=0'); 
47            
48         if($user and $user->alias) {
49             $this->redirect(Yii::app()->createUrl($user->alias));
50         }
51 
52         if(!$user) {
53             $user = Users::model()->with(['occupation', 'portfolio', 'flo', 'show'])->findByAttributes(['alias' => $id], 't.active=1 and t.deleted=0');
54             $id = $user->id;
55             if(!$user) {
56                 throw new ErrorException('Not Found');
57             }
58         }
59 
60 
61         if($user) {
62             $this->o_occupation = $user->occupation;
63         }
64 
65         if ($user->member_type == 'pro') {
66             $occupation_name = mb_strtolower($user->occupation->name, 'utf8');
67             $a_service_name = [];
68             foreach (['portfolio', 'flo', 'show'] as $type) {

Stack Trace

#14
+
 /var/www/happymoments.ua/web/index.php(56): CApplication->run()
51 //echo '<pre>';
52 //var_dump(CMap::mergeArray($config, $config_env)); exit;
53 $app = Yii::createWebApplication(CMap::mergeArray($config, $config_env));
54 
55 $app->setGlobalState('env', $environment, 'production');
56 $app->run();
2024-03-28 17:35:25 Apache/2.4.18 (Ubuntu) Yii Framework/1.1.17