Skip to content

Commit c5efece

Browse files
committed
beta 14
1 parent 525dc08 commit c5efece

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
"type": "flarum-extension",
88
"license": "MIT",
99
"require": {
10-
"flarum/core": "^0.1.0-beta.8",
11-
"fgribreau/mailchecker": "^3.2.33"
10+
"flarum/core": "^0.1.0-beta.14",
11+
"fgribreau/mailchecker": "^3.3.17"
1212
},
1313
"authors": [
1414
{

extend.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,20 @@
1515
use Flarum\Foundation\ValidationException;
1616
use Flarum\User\Event\Saving;
1717
use Illuminate\Events\Dispatcher;
18+
use Illuminate\Support\Arr;
1819
use MailChecker;
1920

2021
return [
2122
new Extend\Locales(__DIR__.'/locale'),
22-
new Extend\Compat(function (Dispatcher $events) {
23+
function (Dispatcher $events) {
2324
$events->listen(Saving::class, function (Saving $event) {
24-
$email = array_get($event->data, 'attributes.email');
25+
$email = Arr::get($event->data, 'attributes.email');
2526

2627
if ($email !== null && !MailChecker::isValid($email)) {
2728
throw new ValidationException([
2829
app('translator')->trans('fof-email-checker.error.disposable_email_message'),
2930
]);
3031
}
3132
});
32-
}),
33+
},
3334
];

0 commit comments

Comments
 (0)