mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
cambios de legacytables3
This commit is contained in:
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user