Browse Source

fix(v2ray): fix get uuid error

Indexyz 7 years ago
parent
commit
bc76386c9d
2 changed files with 2 additions and 2 deletions
  1. 1 1
      app/Controllers/Mod_Mu/UserController.php
  2. 1 1
      app/Models/User.php

+ 1 - 1
app/Controllers/Mod_Mu/UserController.php

@@ -81,7 +81,7 @@ class UserController extends BaseController
         foreach ($users_raw as $user_raw) {
             if ($user_raw->transfer_enable > $user_raw->u + $user_raw->d) {
                 $user_raw = Tools::keyFilter($user_raw, $key_list);
-                $user_raw->uuid = Uuid::uuid3(Uuid::NAMESPACE_DNS, $user->id . "|" . $user_raw->passwd)->toString();
+                $user_raw->uuid = $user_raw->getUuid();
                 array_push($users, $user_raw);
             }
         }

+ 1 - 1
app/Models/User.php

@@ -124,7 +124,7 @@ class User extends Model
     }
 
     public function getUuid() {
-        return Uuid::uuid3(Uuid::NAMESPACE_DNS, $this->attributes['passwd'])->toString();
+        return Uuid::uuid3(Uuid::NAMESPACE_DNS, $this->attributes['id']. '|' .$this->attributes['passwd'])->toString();
     }
 
     public function addManyInviteCodes($num)