Skip to content

Commit 2647e30

Browse files
committed
build for #906
1 parent 18afe9c commit 2647e30

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

api.include.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8076,7 +8076,10 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface
80768076
$username = isset($body->$usernameFormFieldName) ? $body->$usernameFormFieldName : '';
80778077
$password = isset($body->$passwordFormFieldName) ? $body->$passwordFormFieldName : '';
80788078
$newPassword = isset($body->$newPasswordFormFieldName) ? $body->$newPasswordFormFieldName : '';
8079-
$tableName = $this->getProperty('usersTable', 'users');
8079+
if($path ==='login')
8080+
$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
8081+
else
8082+
$tableName = $this->getProperty('usersTable', 'users');
80808083
$table = $this->reflection->getTable($tableName);
80818084
$usernameColumnName = $this->getProperty('usernameColumn', 'username');
80828085
$usernameColumn = $table->getColumn($usernameColumnName);

api.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8076,7 +8076,10 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface
80768076
$username = isset($body->$usernameFormFieldName) ? $body->$usernameFormFieldName : '';
80778077
$password = isset($body->$passwordFormFieldName) ? $body->$passwordFormFieldName : '';
80788078
$newPassword = isset($body->$newPasswordFormFieldName) ? $body->$newPasswordFormFieldName : '';
8079-
$tableName = $this->getProperty('usersTable', 'users');
8079+
if($path ==='login')
8080+
$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
8081+
else
8082+
$tableName = $this->getProperty('usersTable', 'users');
80808083
$table = $this->reflection->getTable($tableName);
80818084
$usernameColumnName = $this->getProperty('usernameColumn', 'username');
80828085
$usernameColumn = $table->getColumn($usernameColumnName);

0 commit comments

Comments
 (0)