++ cambio password obbligato: al primo accesso del sorvegliante dice "Password temporanea", non "Ripristino da backup"
users.password_temporanea distingue la password provvisoria data dall'amministratore (creazione del gruppo, "Nuova password temporanea") dal ripristino da backup. Migrazione 000040; si spegne a password cambiata, il ripristino e l'import XML la spengono per tutti. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -109,7 +109,7 @@ class GruppoShow extends Component
|
||||
}
|
||||
|
||||
$password = Str::password(12, symbols: false);
|
||||
$utente->forceFill(['password' => $password, 'password_change_required' => true])->save();
|
||||
$utente->forceFill(['password' => $password, 'password_change_required' => true, 'password_temporanea' => true])->save();
|
||||
activity()->causedBy(auth()->user())->performedOn($utente)->log('password_reimpostata');
|
||||
|
||||
$this->passwordTemporanea = $password;
|
||||
|
||||
@@ -80,6 +80,7 @@ class Profile extends Component
|
||||
auth()->user()->update([
|
||||
'password' => $this->password,
|
||||
'password_change_required' => false,
|
||||
'password_temporanea' => false,
|
||||
]);
|
||||
|
||||
$this->reset(['current_password', 'password', 'password_confirmation']);
|
||||
|
||||
@@ -582,6 +582,7 @@ class XmlExchange extends Component
|
||||
if ($passwordHash !== '' && ! $eAttore) {
|
||||
$meta['password'] = $passwordHash;
|
||||
$meta['password_change_required'] = true;
|
||||
$meta['password_temporanea'] = false;
|
||||
}
|
||||
if (! $eAttore) {
|
||||
$meta['remember_token'] = null;
|
||||
|
||||
Reference in New Issue
Block a user