|
|
@@ -130,6 +130,14 @@ class Register extends Common
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ if ($nowuid) {
|
|
|
+ $old = Db::name('accounts')->where(['account_name' => $nowuid])->find();
|
|
|
+ if ($old) {
|
|
|
+ Db::name('accounts')->where(['account_name' => $nowuid])->update(['last_login_time' => time()]);
|
|
|
+ return json(['code' => 1, 'data' => ['id' => $old['id'], 'name' => $nowuid, 'token' => $old['tokenvip']], 'msg' => '注册成功', 'tutype' => 1]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
if ($token) {
|
|
|
$old = db('accounts')->where(['token' => $token])->find();
|
|
|
if ($old) {
|
|
|
@@ -141,13 +149,6 @@ class Register extends Common
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if ($nowuid) {
|
|
|
- $old = Db::name('accounts')->where(['account_name' => $nowuid])->find();
|
|
|
- if ($old) {
|
|
|
- Db::name('accounts')->where(['account_name' => $nowuid])->update(['last_login_time' => time()]);
|
|
|
- return json(['code' => 1, 'data' => ['id' => $old['id'], 'name' => $nowuid, 'token' => $old['tokenvip']], 'msg' => '注册成功', 'tutype' => 1]);
|
|
|
- }
|
|
|
- }
|
|
|
|
|
|
NEWUSERLABLE:
|
|
|
$now = time();
|