Browse Source

注册生成用户名

lizhen_gitee 1 year ago
parent
commit
652e06e5dc
1 changed files with 3 additions and 1 deletions
  1. 3 1
      application/common/library/Auth.php

+ 3 - 1
application/common/library/Auth.php

@@ -220,7 +220,8 @@ class Auth
             $user = User::create($params, true);
 
             $this->_user = User::get($user->id);
-            $this->_user->username = 'u' . 10000 + $user->id;
+            $this->_user->username = 'u' . (10000 + $user->id);
+
             $this->_user->save();
 
             //设置Token
@@ -246,6 +247,7 @@ class Auth
             $this->_user->power = $userpower;
 
             //[环信]注册用户。忽略失败
+            dump($user->id);exit;
             $easemob = new Easemob();
             $rs = $easemob->user_create($user->id);
             if($rs === false){