fix: [user:beforeSave] Only call the user-update callback if the user is not new

cli-modification-summary
Sami Mokaddem 2022-10-21 09:00:49 +02:00
parent c65978f8f2
commit a091edbf22
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
1 changed files with 3 additions and 1 deletions

View File

@ -63,7 +63,9 @@ class UsersTable extends AppTable
public function beforeSave(EventInterface $event, EntityInterface $entity, ArrayObject $options)
{
$success = $this->handleUserUpdateRouter($entity);
if (!$entity->isNew()) {
$success = $this->handleUserUpdateRouter($entity);
}
return $success;
}