original_string: public function beforeSave(Event $event, User $user)
      {
          if (!$user->isNew() && $user->has('password') && empty($user->password)) {
              $user->unsetProperty('password');
              $user->dirty('password', false);
          }
      }
code: public function beforeSave(Event $event, User $user)
      {
          if (!$user->isNew() && $user->has('password') && empty($user->password)) {
              $user->unsetProperty('password');
              $user->dirty('password', false);
          }
      }
code_tokens: public function beforeSave ( Event $ event , User $ user ) { if ( ! $ user -> isNew ( ) && $ user -> has ( 'password' ) && empty ( $ user -> password ) ) { $ user -> unsetProperty ( 'password' ) ; $ user -> dirty ( 'password' , false ) ; } }
docstring: 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
docstring_tokens: If not password is sent means user is not changing it .