If not password is sent means user is not changing it.

@param \Cake\Event\Event $event The event that was triggered
@param \User\Model\Entity\User $user User entity being saved
@return void
429342
public function beforeSave(Event $event, User $user)
    {
        if (!$user->isNew() && $user->has('password') && empty($user->password)) {
            $user->unsetProperty('password');
            $user->dirty('password', false);
        }
    }
379796
public function checkCurrentUser(GetResponseUserEvent $event)
    {
        $currentUser = $this->tokenStorage->getToken()->getUser();

        if ($currentUser instanceof UserInterface) {
            $resetUser = $event->getUser();

            if ($currentUser->getId() !== $resetUser->getId()) {
                $this->setRedirecToLogin($event);
            }
        }
    }
582215
public function onUserAutoRegistered(UserAutoRegisteredEvent $event)
    {
        $model = $event->getUser();

        $this->mail->send('Вы зарегистрированы на сайте', $model->email, 'user/mail/registration', [
            'model' => $model,
            'raw_password' => $event->getRawPassword(),
        ]);
    }
962534
public function submit(FormEvent $event)
    {
        $user = $event->getData();
        if (null === $user) {
            return;
        }
        if ($this->currentUser !== null && $this->currentUser !== $user && $event->getForm()->has('activated')) {
            $activated = $event->getForm()->get('activated')->getData();
            if ($activated && $user->getRegistrationToken()) {
                $user->setRegistrationToken(null);
            } elseif (!$activated && !$user->getRegistrationToken()) {
                $user->setRegistrationToken(hash("sha1",rand()));
            }
        }
    }
1144217
public function beforeSave(Event $event)
    {
        if (isset($this->_controller()->request->data['password'])) {
            $password = $this->_controller()->request->data['password'];
            $event->subject->entity['password'] = $password;
        }
    }
677241
public function handle(Registered $event)
    {
        if ($event->user instanceof MustVerifyEmail && ! $event->user->hasVerifiedEmail()) {
            $event->user->sendEmailVerificationNotification();
        }
    }
301076
public function onSerialize(DecorateUserEvent $event)
    {
        $casUserId = $this->casManager->getCasUserIdByUserId($event->getUser()->getId());

        $event->add('cas_data', [
            'id' => $casUserId,
        ]);
    }
783915
public function onStorageEventPreDelete(StorageEvent $event)
    {
        /** @var Entity\Users $userEntity */
        $userEntity = $event->getContent();
        if (!$userEntity instanceof Entity\Users) {
            return;
        }

        $this->deleteAuthtokens($userEntity);
        $this->deleteSessions($userEntity);
    }
41052
public function onPostCreate(UserEvent $event)
    {
        if (!$event->hasData('password')) {
            return;
        }

        /** @var \Ekyna\Bundle\UserBundle\Model\UserInterface $user */
        $user = $event->getResource();
        if (!$user->getSendCreationEmail()) {
            return;
        }

        if (0 < $this->mailer->sendCreationEmailMessage($user, $event->getData('password'))) {
            $event->addMessage(new ResourceMessage('ekyna_user.user.event.credentials_sent'));
        }
    }
804075
protected function handle(Event $event)
    {
        $method = $this->getApplyMethod($event);
        if (!method_exists($this, $method)) {
            return;
        }
        $this->$method($event);
    }
704978
public function handleEvent(Event $event)
    {
        if (!$event instanceof UserInfoWithPassword) {
            throw new InvalidArgumentException(t('Invalid event type provided. Event type must be "UserInfoWithPassword".'));
        }

        // Track the password use
        $this->tracker->trackUse($event->getUserPassword(), $event->getUserInfoObject());
    }
799630
public function deactivated(DeactivateUser $event)
    {
        /** @var UserDeactivatedType $type */
        $type = $this->notificationManager->driver(UserDeactivatedType::IDENTIFIER);
        $notifier = $type->getNotifier();

        if (method_exists($notifier, 'notify')) {
            $subscription = $type->getSubscription($event);
            $users = $notifier->getUsersToNotify($subscription, $event);
            $notification = new UserDeactivatedNotification($event);
            $notifier->notify($users, $notification);
        }
    }
426410
public function onUserLostPassword(UserLostPasswordEvent $event)
    {
        $model = $event->getUser();

        $this->mail->send('Восстановление пароля на сайте', $model->email, 'user/mail/lost_password', [
            'model' => $model,
            'confirm_url' => $this->generator->generate('user_lost_password_confirm', [
                'token' => $model->token,
            ], UrlGeneratorInterface::ABSOLUTE_URL),
        ]);
    }
27349
public function afterLogin(Event $event)
    {
        if ($event->subject->success) {
            $this->_setUser($event->subject->user);
            $this->_setJwt($event->subject->user['id']);
        }
    }
810820
public function fireEvent(string $event): void
    {
        $this->log->debug('Event {event} has been fired.', ['event' => $event]);
        foreach ($this->event_handlers as $handler) {
            /** @var EventHandler $handler */
            if ($event === $handler->getEvent()) {
                $handler->execute();
            }
        }
    }
39635
public function handle(DeletingUser $event)
    {
        if ($event->user->isAdmin())
            return false;

        if ($event->user->isForceDeleting())
            $event->user->detachAllRoles(false);

        return true;
    }
35692
public function view($user, Event $event)
    {
        if ($event->creator->id == $user->id) {
            return true;
        }

        return User::findOrFail($user->id)->hasPermission('laralum::events.view');
    }