mirror of
https://github.com/v2board/v2board.git
synced 2024-11-10 17:49:11 +08:00
fix get email whitelist suffix
This commit is contained in:
parent
13bc683faf
commit
5db26d862b
@ -22,7 +22,7 @@ class CommController extends Controller
|
|||||||
'isEmailVerify' => (int)config('v2board.email_verify', 0) ? 1 : 0,
|
'isEmailVerify' => (int)config('v2board.email_verify', 0) ? 1 : 0,
|
||||||
'isInviteForce' => (int)config('v2board.invite_force', 0) ? 1 : 0,
|
'isInviteForce' => (int)config('v2board.invite_force', 0) ? 1 : 0,
|
||||||
'emailWhitelistSuffix' => (int)config('v2board.email_whitelist_enable', 0)
|
'emailWhitelistSuffix' => (int)config('v2board.email_whitelist_enable', 0)
|
||||||
? config('v2board.email_whitelist_suffix', Dict::EMAIL_WHITELIST_SUFFIX_DEFAULT)
|
? $this->getEmailSuffix()
|
||||||
: 0
|
: 0
|
||||||
]
|
]
|
||||||
]);
|
]);
|
||||||
@ -74,4 +74,13 @@ class CommController extends Controller
|
|||||||
'data' => true
|
'data' => true
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function getEmailSuffix()
|
||||||
|
{
|
||||||
|
$suffix = config('v2board.email_whitelist_suffix', Dict::EMAIL_WHITELIST_SUFFIX_DEFAULT);
|
||||||
|
if (!is_array($suffix)) {
|
||||||
|
return preg_split('/,/', $suffix);
|
||||||
|
}
|
||||||
|
return $suffix;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user