hotfix-Ticket-#097414-traducción-meensaje-de-error #32

Merged
carlosap merged 3 commits from hotfix-Ticket-#097414-traducción-meensaje-de-error into master 2023-06-20 12:02:03 +00:00
3 changed files with 2 additions and 42 deletions
Showing only changes of commit 59242daa79 - Show all commits

2
debian/changelog vendored
View File

@ -1,4 +1,4 @@
hedera-web (23.6.10) stable; urgency=low
hedera-web (23.6.11) stable; urgency=low
* Initial Release.

View File

@ -1,6 +1,6 @@
{
"name": "hedera-web",
"version": "23.6.10",
"version": "23.6.11",
"description": "Verdnatura web page",
"license": "GPL-3.0",
"repository": {

View File

@ -1,40 +0,0 @@
<?php
class Account {
static function trySync($db, $userName, $password = NULL) {
$sync = $db->getValue(
'SELECT COUNT(*) > 0 FROM account.userSync WHERE name = #',
[$userName]
);
if ($sync)
self::sync($db, $userName, $password);
}
static function sync($db, $userName, $password = NULL) {
$bcryptPassword = password_hash($password, PASSWORD_BCRYPT);
$userId = $db->getValue(
'SELECT id FROM account.user WHERE `name` = #',
[$userName]
);
$db->query(
'UPDATE account.user SET
bcryptPassword = #
WHERE id = #',
[$bcryptPassword, $userId]
);
$hasAccount = $db->getValue(
'SELECT COUNT(*) > 0
FROM account.user u
JOIN account.account a ON u.id = a.id
WHERE u.name = #',
[$userName]
);
if (!$hasAccount)
$db->query('DELETE FROM account.userSync WHERE name = #',
[$userName]
);
}
}