updatePersonalData
The updatePersonalData hook is triggered after a member has updated their personal data via the respective
front end module. It passes the front end user, the updated data and the front end module and does not expect
a return value.
Be aware that the front end user object and the database has already been updated when this hook is triggered.
Parameters
\Contao\FrontendUser
$memberThe front end user instance who changed their data.
array
$dataThe submitted form data.
\Contao\Module
$moduleThe front end module of type
\Contao\ModulePersonalData.
Example
// src/EventListener/UpdatePersonalDataListener.php
namespace App\EventListener;
use Contao\CoreBundle\DependencyInjection\Attribute\AsHook;
use Contao\Module;
use Contao\FrontendUser;
#[AsHook('updatePersonalData')]
class UpdatePersonalDataListener
{
public function __invoke(FrontendUser $member, array $data, Module $module): void
{
// Do something …
}
}