north 7 سال پیش
والد
کامیت
98a5ae1777
1فایلهای تغییر یافته به همراه5 افزوده شده و 0 حذف شده
  1. 5 0
      www/protected/modules/j/controllers/HouseKeepingController.php

+ 5 - 0
www/protected/modules/j/controllers/HouseKeepingController.php

@@ -45,6 +45,11 @@ class HouseKeepingController extends JBaseController
         $c->user_id('==',new MongoId($id));
         $tmp = JEmploye::model()->find($c);
         $data = array();
+        if (empty($tmp) ) {
+            $data['user_id'] = '';
+            $data['store_id'] = '';
+            echo json_encode($data);exit;
+        }
         $data['user_id'] = $tmp->user_id;
         $data['store_id'] = $tmp->owned_stores;