Skip to content

Commit

Permalink
Fix #5
Browse files Browse the repository at this point in the history
  • Loading branch information
prinsss committed Jul 29, 2018
1 parent 2ae2242 commit 1e8dee2
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions yggdrasil-api/src/Controllers/AuthController.php
Original file line number Diff line number Diff line change
Expand Up @@ -274,10 +274,8 @@ protected function checkUserCredentials(Request $request, $checkBanned = true)
}

// 兼容 BS 最新版的邮箱验证
if (Schema::hasColumn('users', 'verified')) {
if (option('require_verification') && !$user->verified) {
throw new ForbiddenOperationException('你还没有验证你的邮箱,请在通过皮肤站的邮箱验证后再尝试登录');
}
if (option('require_verification') && $user->verified === false) {
throw new ForbiddenOperationException('你还没有验证你的邮箱,请在通过皮肤站的邮箱验证后再尝试登录');
}

return $user;
Expand Down

0 comments on commit 1e8dee2

Please sign in to comment.