File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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 {
Original file line number Diff line number Diff line change 1515use Flarum \Foundation \ValidationException ;
1616use Flarum \User \Event \Saving ;
1717use Illuminate \Events \Dispatcher ;
18+ use Illuminate \Support \Arr ;
1819use MailChecker ;
1920
2021return [
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];
You can’t perform that action at this time.
0 commit comments