Skip to content

Commit 9843f27

Browse files
authored
Merge pull request #872 from kenjis/remove-autoload-email_helper
refactor: remove Composer autoloading of email helper
2 parents 4851a59 + fe04c11 commit 9843f27

File tree

4 files changed

+4
-2
lines changed

4 files changed

+4
-2
lines changed

composer.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@
5353
"CodeIgniter\\Shield\\": "src"
5454
},
5555
"files": [
56-
"src/Helpers/auth_helper.php",
57-
"src/Helpers/email_helper.php"
56+
"src/Helpers/auth_helper.php"
5857
],
5958
"exclude-from-classmap": [
6059
"**/Database/Migrations/**"

src/Authentication/Actions/Email2FA.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ public function handle(IncomingRequest $request)
7878
$date = Time::now()->toDateTimeString();
7979

8080
// Send the user an email with the code
81+
helper('email');
8182
$email = emailer()->setFrom(setting('Email.fromEmail'), setting('Email.fromName') ?? '');
8283
$email->setTo($user->email);
8384
$email->setSubject(lang('Auth.email2FASubject'));

src/Authentication/Actions/EmailActivator.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ public function show(): string
5555
$date = Time::now()->toDateTimeString();
5656

5757
// Send the email
58+
helper('email');
5859
$email = emailer()->setFrom(setting('Email.fromEmail'), setting('Email.fromName') ?? '');
5960
$email->setTo($userEmail);
6061
$email->setSubject(lang('Auth.emailActivateSubject'));

src/Controllers/MagicLinkController.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ public function loginAction()
113113
$date = Time::now()->toDateTimeString();
114114

115115
// Send the user an email with the code
116+
helper('email');
116117
$email = emailer()->setFrom(setting('Email.fromEmail'), setting('Email.fromName') ?? '');
117118
$email->setTo($user->email);
118119
$email->setSubject(lang('Auth.magicLinkSubject'));

0 commit comments

Comments
 (0)