@@ -38,10 +38,10 @@ public function sendConfirmationEmailMessage(UserInterface $user)
38
38
$ template = $ this ->parameters ['template ' ]['confirmation ' ];
39
39
$ url = $ this ->router ->generate ('fos_user_registration_confirm ' , array ('token ' => $ user ->getConfirmationToken ()), true );
40
40
41
- $ context = $ this -> twig -> mergeGlobals ( array (
41
+ $ context = array (
42
42
'user ' => $ user ,
43
43
'confirmationUrl ' => $ url
44
- )) ;
44
+ );
45
45
46
46
$ this ->sendMessage ($ template , $ context , $ this ->parameters ['from_email ' ]['confirmation ' ], $ user ->getEmail ());
47
47
}
@@ -51,10 +51,10 @@ public function sendResettingEmailMessage(UserInterface $user)
51
51
$ template = $ this ->parameters ['template ' ]['resetting ' ];
52
52
$ url = $ this ->router ->generate ('fos_user_resetting_reset ' , array ('token ' => $ user ->getConfirmationToken ()), true );
53
53
54
- $ context = $ this -> twig -> mergeGlobals ( array (
54
+ $ context = array (
55
55
'user ' => $ user ,
56
56
'confirmationUrl ' => $ url
57
- )) ;
57
+ );
58
58
59
59
$ this ->sendMessage ($ template , $ context , $ this ->parameters ['from_email ' ]['resetting ' ], $ user ->getEmail ());
60
60
}
@@ -67,6 +67,7 @@ public function sendResettingEmailMessage(UserInterface $user)
67
67
*/
68
68
protected function sendMessage ($ templateName , $ context , $ fromEmail , $ toEmail )
69
69
{
70
+ $ context = $ this ->twig ->mergeGlobals ($ context );
70
71
$ template = $ this ->twig ->loadTemplate ($ templateName );
71
72
$ subject = $ template ->renderBlock ('subject ' , $ context );
72
73
$ textBody = $ template ->renderBlock ('body_text ' , $ context );
0 commit comments