mirror of
https://github.com/v2board/v2board.git
synced 2024-11-10 17:49:11 +08:00
update
This commit is contained in:
parent
fdf63813df
commit
54e08ef0ba
@ -4,8 +4,8 @@ namespace App\Console\Commands;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
use App\Models\User;
|
||||
use App\Utils\Helper;
|
||||
use App\Models\Order;
|
||||
use App\Utils\Helper;
|
||||
use Illuminate\Support\Facades\Redis;
|
||||
|
||||
class SystemCache extends Command
|
||||
|
@ -49,16 +49,17 @@ class RegisterController extends Controller
|
||||
->where('status', 0)
|
||||
->first();
|
||||
if (!$inviteCode) {
|
||||
if ((int)config('v2board.invite_force', env('V2BOARD_INVITE_FOCE'))) {
|
||||
if ((int)config('v2board.invite_force', 0)) {
|
||||
abort(500, '邀请码无效');
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$user->invite_user_id = $inviteCode->user_id ? $inviteCode->user_id : null;
|
||||
if (!(int)config('v2board.invite_never_expire', env('V2BOARD_INVITE_NEVER_EXPIRE'))) {
|
||||
$inviteCode->status = 1;
|
||||
$inviteCode->save();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!$user->save()) {
|
||||
abort(500, '注册失败');
|
||||
|
Loading…
Reference in New Issue
Block a user