Store booleans correctly.

This commit is contained in:
James Cole
2018-12-21 15:42:57 +01:00
parent 922c8703f5
commit a5520d45e7
6 changed files with 20 additions and 6 deletions

View File

@@ -65,9 +65,13 @@ class UserRequest extends Request
*/
public function getAll(): array
{
$blocked = false;
if (null === $this->get('blocked')) {
$blocked = $this->boolean('blocked');
}
$data = [
'email' => $this->string('email'),
'blocked' => $this->boolean('blocked'),
'blocked' => $blocked,
'blocked_code' => $this->string('blocked_code'),
'role' => $this->string('role'),
];