Atulizacao da documentacao e trait para forcar alteracao de senha

refatoracoes-metodos
Pablo 10 months ago
parent 866bc76f31
commit 7dc97dde2f

@ -197,4 +197,4 @@ return Application::configure(basePath: dirname(__DIR__))
->withExceptions(function (Exceptions $exceptions) { ->withExceptions(function (Exceptions $exceptions) {
// //
})->create(); })->create();
``` ```

@ -11,4 +11,12 @@ trait HasPasswordValidation
$passwordExpiresAtColumn = config('ae3auth-config.user.expires_password_column_name'); $passwordExpiresAtColumn = config('ae3auth-config.user.expires_password_column_name');
return Carbon::now()->greaterThan($this->$passwordExpiresAtColumn); return Carbon::now()->greaterThan($this->$passwordExpiresAtColumn);
} }
}
/**
* @return void
*/
public function forceChangePassword(): void
{
$this->forceFill(['force_change_password' => true])->save();
}
}

Loading…
Cancel
Save