Skip to content

Commit

Permalink
Fix : invite bug, register bug
Browse files Browse the repository at this point in the history
  • Loading branch information
sendya committed Jun 4, 2016
1 parent 8104ad7 commit e8eba06
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Data/version.lock
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.18
v1.19.3
6 changes: 3 additions & 3 deletions Library/Controller/Auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ public function register()
'useTraffic' => Utils::flowAutoShow($user->flow_up + $user->flow_down),
'transfer' => Utils::flowAutoShow($user->transfer),
'expireTime' => date('Y-m-d H:i:s', $user->expireTime),
'REGISTER_URL' => base64_encode($user->uid . "\t" . $forgePwdCode['verification'] . "\t" . $forgePwdCode['time'])
'REGISTER_URL' => base64_encode($user->email . "\t" . $forgePwdCode['verification'] . "\t" . $forgePwdCode['time'])
];
$mail->content = Utils::placeholderReplace($mail->content, $params);
$mailer->send($mail);
Expand Down Expand Up @@ -235,7 +235,7 @@ public function resend()
'useTraffic' => Utils::flowAutoShow($user->flow_up + $user->flow_down),
'transfer' => Utils::flowAutoShow($user->transfer),
'expireTime' => date('Y-m-d H:i:s', $user->expireTime),
'REGISTER_URL' => base64_encode($user->uid . "\t" . $forgePwdCode['verification'] . "\t" . $forgePwdCode['time'])
'REGISTER_URL' => base64_encode($user->email . "\t" . $forgePwdCode['verification'] . "\t" . $forgePwdCode['time'])
];
$mail->content = Utils::placeholderReplace($mail->content, $params);
$mailer->send($mail);
Expand All @@ -255,7 +255,7 @@ public function verification()
$list = explode("\t", base64_decode($_GET['verification']));

if (count($list) > 2) {
$user = User::getUserByUserId($list[0]);
$user = User::getUserByEmail($list[0]);
$verification = trim($list[1]);
$json = json_decode($user->forgePwdCode, true);
$userVerificationCode = $json['verification'];
Expand Down
17 changes: 17 additions & 0 deletions Migrations/20160604144051_update_to1193.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

use Phinx\Db\Adapter\MysqlAdapter;
use Phinx\Migration\AbstractMigration;

class UpdateTo1193 extends AbstractMigration
{
public function up()
{
$table = $this->table('node');
$column = $table->hasColumn('ratio');
if(!$column) {
$table->addColumn('ratio', 'integer', ['limit' => MysqlAdapter::INT_TINY, 'default' => 1, 'comment' => '节点流量倍率']);
$table->save();
}
}
}
1 change: 1 addition & 0 deletions Template/Default/admin/message.htm
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ <h4 class="modal-title"></h4>
</div>
</div>
</div>
<p>注意,请使用 <code>&lt;br /&gt;</code> 换行,不要直接敲回车</p>
</div>
</div>
<div class="modal-footer">
Expand Down
3 changes: 0 additions & 3 deletions Template/Default/panel/info.htm
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ <h1 class="title">用户中心</h1>
<!--
<p><button class="btn btn-danger btn-sm" id="deleteMe">删除我的账户</button></p>
-->
<div class="form-block">
<input type="checkbox" checked class="iswitch">
</div>
</div>
</div>
</div>
Expand Down

0 comments on commit e8eba06

Please sign in to comment.