fix(email): set the correct url in the activation and forgot emails

- add default values for Config/Email properties
- set mariadb to the minimal required version for development

fixes #204
This commit is contained in:
Yassine Doghri 2022-08-24 09:45:22 +00:00
parent 029804b9f8
commit 10fc6f17c6
5 changed files with 8 additions and 19 deletions

View File

@ -8,9 +8,9 @@ use CodeIgniter\Config\BaseConfig;
class Email extends BaseConfig
{
public string $fromEmail;
public string $fromEmail = 'hello@castopod.local';
public string $fromName;
public string $fromName = 'Castopod';
public string $recipients;
@ -32,17 +32,17 @@ class Email extends BaseConfig
/**
* SMTP Server Address
*/
public string $SMTPHost;
public string $SMTPHost = '';
/**
* SMTP Username
*/
public string $SMTPUser;
public string $SMTPUser = '';
/**
* SMTP Password
*/
public string $SMTPPass;
public string $SMTPPass = '';
/**
* SMTP Port

View File

@ -31,7 +31,7 @@ services:
- castopod
mariadb:
image: mariadb:latest
image: mariadb:10.2
container_name: castopod_mariadb
ports:
- 3306:3306

View File

@ -45,17 +45,6 @@ class Auth extends MythAuthConfig
*/
public $allowRegistration = false;
/**
* --------------------------------------------------------------------------
* Require confirmation registration via email
* --------------------------------------------------------------------------
* When enabled, every registered user will receive an email message
* with a special link he have to confirm to activate his account.
*
* @var bool
*/
public $requireActivation = false;
/**
* --------------------------------------------------------------------------
* Auth gateway

View File

@ -2,7 +2,7 @@
<p>To activate your account use this URL.</p>
<p><a href="<?= base_url('activate-account') .
<p><a href="<?= url_to('activate-account') .
'?token=' .
$hash ?>">Activate account</a>.</p>

View File

@ -4,7 +4,7 @@
<p>Your Code: <?= $hash ?></p>
<p>Visit the <a href="<?= base_url('reset-password') .
<p>Visit the <a href="<?= url_to('reset-password') .
'?token=' .
$hash ?>">Reset Form</a>.</p>