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.
|
* Initial Release.
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "hedera-web",
|
"name": "hedera-web",
|
||||||
"version": "1.407.57",
|
"version": "1.407.58",
|
||||||
"description": "Verdnatura web page",
|
"description": "Verdnatura web page",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
|
@ -231,7 +231,7 @@ abstract class Service {
|
||||||
return $this->userDb;
|
return $this->userDb;
|
||||||
|
|
||||||
$row = $this->db->getObject(
|
$row = $this->db->getObject(
|
||||||
'SELECT r.name, rc.mysqlPassword, uc.loginKey
|
'SELECT r.name, rc.mysqlPassword, rc.rolePrefix, uc.loginKey
|
||||||
FROM account.user u
|
FROM account.user u
|
||||||
JOIN account.role r ON r.id = u.role
|
JOIN account.role r ON r.id = u.role
|
||||||
JOIN account.roleConfig rc ON TRUE
|
JOIN account.roleConfig rc ON TRUE
|
||||||
|
@ -240,7 +240,7 @@ abstract class Service {
|
||||||
[$user]
|
[$user]
|
||||||
);
|
);
|
||||||
|
|
||||||
$userName = "z-{$row->name}";
|
$userName = "{$row->rolePrefix}{$row->name}";
|
||||||
$password = base64_decode($row->mysqlPassword);
|
$password = base64_decode($row->mysqlPassword);
|
||||||
$userDb = $this->app->createConnection($userName, $password, TRUE);
|
$userDb = $this->app->createConnection($userName, $password, TRUE);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue