public function actionAllot($uid) { $user = User::findOne($uid); if (empty($user) || $user->rid != 3) { return; } $shops = Shop::findBySql('SELECT * FROM ' . Shop::tableName() . ' where uid = ' . $user->id . ' or uid = 0')->all(); return $this->render('allot', array('shops' => $shops, 'uid' => $user->id)); }