forked from verdnatura/hedera-web
MySQL rolePrefix fix
This commit is contained in:
parent
8522097950
commit
b2535c5d38
|
@ -1,4 +1,4 @@
|
|||
hedera-web (1.407.57) stable; urgency=low
|
||||
hedera-web (1.407.58) stable; urgency=low
|
||||
|
||||
* Initial Release.
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "hedera-web",
|
||||
"version": "1.407.57",
|
||||
"version": "1.407.58",
|
||||
"description": "Verdnatura web page",
|
||||
"license": "GPL-3.0",
|
||||
"repository": {
|
||||
|
|
|
@ -231,7 +231,7 @@ abstract class Service {
|
|||
return $this->userDb;
|
||||
|
||||
$row = $this->db->getObject(
|
||||
'SELECT r.name, rc.mysqlPassword, uc.loginKey
|
||||
'SELECT r.name, rc.mysqlPassword, rc.rolePrefix, uc.loginKey
|
||||
FROM account.user u
|
||||
JOIN account.role r ON r.id = u.role
|
||||
JOIN account.roleConfig rc ON TRUE
|
||||
|
@ -240,7 +240,7 @@ abstract class Service {
|
|||
[$user]
|
||||
);
|
||||
|
||||
$userName = "z-{$row->name}";
|
||||
$userName = "{$row->rolePrefix}{$row->name}";
|
||||
$password = base64_decode($row->mysqlPassword);
|
||||
$userDb = $this->app->createConnection($userName, $password, TRUE);
|
||||
|
||||
|
|
Loading…
Reference in New Issue