-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added custom event to fix email confirmation system (#156)
* Added custom event to fix email confirmation system * Update UserFormEvent.php Use `FormEvent` as base class * Update composer.json Updated user bundle dependency * Fix CS * Make event class final Co-authored-by: Christian Gripp <core23@users.noreply.github.com>
- Loading branch information
Showing
5 changed files
with
44 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the NucleosProfileBundle package. | ||
* | ||
* (c) Christian Gripp <mail@core23.de> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Nucleos\ProfileBundle\Event; | ||
|
||
use Nucleos\UserBundle\Event\FormEvent ; | ||
use Nucleos\UserBundle\Model\UserInterface; | ||
use Symfony\Component\Form\FormInterface; | ||
use Symfony\Component\HttpFoundation\Request; | ||
use Symfony\Component\HttpFoundation\Response; | ||
|
||
final class UserFormEvent extends FormEvent | ||
{ | ||
/** | ||
* @var UserInterface | ||
*/ | ||
private $user; | ||
|
||
public function __construct(UserInterface $user, FormInterface $form, Request $request) | ||
{ | ||
parent::__construct($form, $request); | ||
$this->user = $user; | ||
} | ||
|
||
public function getUser(): UserInterface | ||
{ | ||
return $this->user; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters