src/UserRepository.php
public function save(IUser $user): bool
    {
        if (!$user instanceof Entity) {
            return false;
        }

        return entityManager()->save($user);
    }
public function save(IUser $user): bool
    {
        if (!$user instanceof Entity) {
            return false;
        }

        return entityManager()->save($user);
    }
Save modified user

@param IUser|User $user
@return bool