cambios de legacytables3

This commit is contained in:
Jaime Jiménez
2023-05-16 12:59:12 +02:00
parent ea0c714550
commit 5a0b82dcbb
58 changed files with 2955 additions and 468 deletions

View File

@ -54,10 +54,8 @@ class Users extends \App\Controllers\GoBaseController {
}
public function add() {
public function add() {
$requestMethod = $this->request->getMethod();
if ($requestMethod === 'post') :
@ -70,6 +68,7 @@ class Users extends \App\Controllers\GoBaseController {
$phpass = new PasswordHash(8, true);
$postData['password'] = $phpass->HashPassword($this->request->getPost('password'));
}
$currentGroups = $postData['group'];
unset($postData['group']);
@ -163,6 +162,11 @@ class Users extends \App\Controllers\GoBaseController {
$currentGroups = $postData['group'];
unset($postData['group']);
if(!empty($postData['password'])){
$phpass = new PasswordHash(8, true);
$postData['password'] = $phpass->HashPassword($this->request->getPost('password'));
}
$sanitizedData = $this->sanitized($postData, $nullIfEmpty);
if ($this->request->getPost('tfa') == null ) {
$sanitizedData['tfa'] = false;