Skip to content

Commit 53d931c

Browse files
committed
update
1 parent 9a3d641 commit 53d931c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Tqdev/PhpCrudApi/Middleware/DbAuthMiddleware.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface
4747
$usernameFormFieldName = $this->getProperty('usernameFormField', 'username');
4848
$passwordFormFieldName = $this->getProperty('passwordFormField', 'password');
4949
$newPasswordFormFieldName = $this->getProperty('newPasswordFormField', 'newPassword');
50-
$username = isset($body->usernameFormFieldName) ? $body->usernameFormFieldName : '';
51-
$password = isset($body->passwordFormFieldName) ? $body->passwordFormFieldName : '';
52-
$newPassword = isset($body->newPasswordFormFieldName) ? $body->newPasswordFormFieldName : '';
50+
$username = isset($body->$usernameFormFieldName) ? $body->$usernameFormFieldName : '';
51+
$password = isset($body->$passwordFormFieldName) ? $body->$passwordFormFieldName : '';
52+
$newPassword = isset($body->$newPasswordFormFieldName) ? $body->$newPasswordFormFieldName : '';
5353
$tableName = $this->getProperty('usersTable', 'users');
5454
$table = $this->reflection->getTable($tableName);
5555
$usernameColumnName = $this->getProperty('usernameColumn', 'username');

0 commit comments

Comments
 (0)