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