Updated qr code generation code

This commit is contained in:
danwin1210 committed 2026-10-11 18:40:42 +02:00
1 parent b59dfe6d1d
commit 6e31c2e890
2 files changed
+12 -3

No files matched your search

+5
View File
@@ -30,6 +30,11 @@ Install files and programs
./install_binaries.sh ./install_binaries.sh
``` ```
When updating the application, copy the updated `composer.json` to `/var/www/mail/` and refresh the installed dependencies and autoloader:
```
cd /var/www/mail && composer install --no-dev --no-interaction
```
Copy (and modify according to your needs) the site files in `etc` to `/etc` after installation has finished. Then restart some services: Copy (and modify according to your needs) the site files in `etc` to `/etc` after installation has finished. Then restart some services:
``` ```
systemctl daemon-reload && systemctl restart tor@default.service systemctl daemon-reload && systemctl restart tor@default.service
+7 -3
View File
@@ -184,9 +184,13 @@ function get_totp_provisioning_uri( string $account, string $secret ): string
function get_totp_qr_data_uri( string $totp_uri ): string function get_totp_qr_data_uri( string $totp_uri ): string
{ {
$qrCode = \Endroid\QrCode\QrCode::create( $totp_uri ) $qrCode = new \Endroid\QrCode\QrCode(
->setSize( 220 ) $totp_uri,
->setMargin( 8 ); new \Endroid\QrCode\Encoding\Encoding( 'UTF-8' ),
\Endroid\QrCode\ErrorCorrectionLevel::Low,
220,
8
);
return ( new \Endroid\QrCode\Writer\PngWriter() )->write( $qrCode )->getDataUri(); return ( new \Endroid\QrCode\Writer\PngWriter() )->write( $qrCode )->getDataUri();
} }