Browse Source

Merge branch 'master' of ssh://git.dever.cc:10022/dever-package/passport

dever 6 years ago
parent
commit
1a74aa48a3
1 changed files with 13 additions and 5 deletions
  1. 13 5
      src/Applet.php

+ 13 - 5
src/Applet.php

@@ -286,16 +286,24 @@ class Applet extends Base
               	$update['set_avatar'] = $pic;
             }
             
-            $update['set_city'] = $city;
+            if ($city) {
+                $update['set_city'] = $city;
+            }
+            
             //$update['set_mobile'] = $mobile;
-            $update['set_province'] = $province;
-            $update['set_country'] = $country;
-            $update['where_id'] = $uid;
-
+            if ($province) {
+                $update['set_province'] = $province;
+            }
+            
+            if ($country) {
+                $update['set_country'] = $country;
+            }
+            
             if ($country && $province && $city) {
                 $update['set_area'] = $country . ',' . $province . ',' . $city;
             }
             if (isset($update) && $update) {
+                $update['where_id'] = $uid;
                 Dever::load('passport/user-update', $update);
             }