north 7 years ago
parent
commit
98a5ae1777
1 changed files with 5 additions and 0 deletions
  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;