mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-26 00:03:16 +00:00
Add security email notifications
This commit is contained in:
parent
3c113a48e9
commit
485cba47ce
5 changed files with 97 additions and 1 deletions
33
app/Mail/EmailChange.php
Normal file
33
app/Mail/EmailChange.php
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Mail;
|
||||||
|
|
||||||
|
use Illuminate\Bus\Queueable;
|
||||||
|
use Illuminate\Mail\Mailable;
|
||||||
|
use Illuminate\Queue\SerializesModels;
|
||||||
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||||
|
|
||||||
|
class EmailChange extends Mailable
|
||||||
|
{
|
||||||
|
use Queueable, SerializesModels;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new message instance.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Build the message.
|
||||||
|
*
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function build()
|
||||||
|
{
|
||||||
|
return $this->markdown('emails.notification.email_change');
|
||||||
|
}
|
||||||
|
}
|
33
app/Mail/PasswordChange.php
Normal file
33
app/Mail/PasswordChange.php
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Mail;
|
||||||
|
|
||||||
|
use Illuminate\Bus\Queueable;
|
||||||
|
use Illuminate\Mail\Mailable;
|
||||||
|
use Illuminate\Queue\SerializesModels;
|
||||||
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||||
|
|
||||||
|
class PasswordChange extends Mailable
|
||||||
|
{
|
||||||
|
use Queueable, SerializesModels;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new message instance.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Build the message.
|
||||||
|
*
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function build()
|
||||||
|
{
|
||||||
|
return $this->markdown('emails.notification.password_change');
|
||||||
|
}
|
||||||
|
}
|
|
@ -8,5 +8,5 @@ Confirm Email
|
||||||
@endcomponent
|
@endcomponent
|
||||||
|
|
||||||
Thanks,<br>
|
Thanks,<br>
|
||||||
{{ config('app.name') }}
|
{{ config('pixelfed.domain.app') }}
|
||||||
@endcomponent
|
@endcomponent
|
||||||
|
|
15
resources/views/emails/notification/email_change.blade.php
Normal file
15
resources/views/emails/notification/email_change.blade.php
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
@component('mail::message')
|
||||||
|
# Account Email Changed
|
||||||
|
|
||||||
|
|
||||||
|
@component('mail::panel')
|
||||||
|
<p>The email associated to your account has been changed.</p>
|
||||||
|
@endcomponent
|
||||||
|
|
||||||
|
<small>If you did not make this change and believe your Pixelfed account has been compromised, please contact the instance admin.</small>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
Thanks,<br>
|
||||||
|
{{ config('pixelfed.domain.app') }}
|
||||||
|
@endcomponent
|
|
@ -0,0 +1,15 @@
|
||||||
|
@component('mail::message')
|
||||||
|
# Account Password Changed
|
||||||
|
|
||||||
|
|
||||||
|
@component('mail::panel')
|
||||||
|
<p>The password for your account has been changed.</p>
|
||||||
|
@endcomponent
|
||||||
|
|
||||||
|
<small>If you did not make this change and believe your Pixelfed account has been compromised, please change your password immediately or contact the instance admin if you're locked out of your account.</small>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
Thanks,<br>
|
||||||
|
{{ config('pixelfed.domain.app') }}
|
||||||
|
@endcomponent
|
Loading…
Reference in a new issue