Skip to content

Commit

Permalink
build for #906
Browse files Browse the repository at this point in the history
  • Loading branch information
mevdschee committed Sep 8, 2022
1 parent 18afe9c commit 2647e30
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion api.include.php
Expand Up @@ -8076,7 +8076,10 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface
$username = isset($body->$usernameFormFieldName) ? $body->$usernameFormFieldName : '';
$password = isset($body->$passwordFormFieldName) ? $body->$passwordFormFieldName : '';
$newPassword = isset($body->$newPasswordFormFieldName) ? $body->$newPasswordFormFieldName : '';
$tableName = $this->getProperty('usersTable', 'users');
if($path ==='login')
$tableName = $this->getProperty('loginTable', 'users'); //add separate property for login as this could be a view joining users table to other table such as roles, details etc. At a minimum, the view output should include the $usernameColumn and $passwordColumn
else
$tableName = $this->getProperty('usersTable', 'users');
$table = $this->reflection->getTable($tableName);
$usernameColumnName = $this->getProperty('usernameColumn', 'username');
$usernameColumn = $table->getColumn($usernameColumnName);
Expand Down
5 changes: 4 additions & 1 deletion api.php
Expand Up @@ -8076,7 +8076,10 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface
$username = isset($body->$usernameFormFieldName) ? $body->$usernameFormFieldName : '';
$password = isset($body->$passwordFormFieldName) ? $body->$passwordFormFieldName : '';
$newPassword = isset($body->$newPasswordFormFieldName) ? $body->$newPasswordFormFieldName : '';
$tableName = $this->getProperty('usersTable', 'users');
if($path ==='login')
$tableName = $this->getProperty('loginTable', 'users'); //add separate property for login as this could be a view joining users table to other table such as roles, details etc. At a minimum, the view output should include the $usernameColumn and $passwordColumn
else
$tableName = $this->getProperty('usersTable', 'users');
$table = $this->reflection->getTable($tableName);
$usernameColumnName = $this->getProperty('usernameColumn', 'username');
$usernameColumn = $table->getColumn($usernameColumnName);
Expand Down

0 comments on commit 2647e30

Please sign in to comment.