mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-06-05 22:09:38 +02:00
Fix token admin
This commit is contained in:
@@ -67,6 +67,7 @@ if (post('action') == 'init') {
|
|||||||
'nome' => 'Amministratori',
|
'nome' => 'Amministratori',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
// Creazione utente Amministratore
|
||||||
$dbo->insert('zz_users', [
|
$dbo->insert('zz_users', [
|
||||||
'username' => post('admin_username'),
|
'username' => post('admin_username'),
|
||||||
'password' => Auth::hashPassword(post('admin_password')),
|
'password' => Auth::hashPassword(post('admin_password')),
|
||||||
@@ -75,6 +76,12 @@ if (post('action') == 'init') {
|
|||||||
'idanagrafica' => isset($id_record) ? $id_record : 0,
|
'idanagrafica' => isset($id_record) ? $id_record : 0,
|
||||||
'enabled' => 1,
|
'enabled' => 1,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
// Creazione token API per l'amministratore
|
||||||
|
$dbo->insert('zz_tokens', [
|
||||||
|
'id_utente' => $dbo->lastInsertedID(),
|
||||||
|
'token' => secure_random_string(),
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$has_settings) {
|
if (!$has_settings) {
|
||||||
|
Reference in New Issue
Block a user