mirror of
https://github.com/flarum/core.git
synced 2025-07-20 08:11:27 +02:00
Clarify condition
I want to make it a little more clear that we are checking exactly for these two values. That may also help preventing further confusion as to why we are not using empty() here. Amendment to PR #1033.
This commit is contained in:
@@ -116,7 +116,7 @@ class RegisterUserHandler
|
|||||||
// from the get-go.
|
// from the get-go.
|
||||||
if (isset($token)) {
|
if (isset($token)) {
|
||||||
foreach ($token->payload as $k => $v) {
|
foreach ($token->payload as $k => $v) {
|
||||||
if ($user->$k === '' || ! isset($user->$k)) {
|
if (in_array($user->$k, ['', null], true)) {
|
||||||
$user->$k = $v;
|
$user->$k = $v;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user