I have discovered a bug where the contents of a profile field are lost, if that field is restricted by Profile Permission, has content, and the user does not have edit access to it.

Steps to reproduce:

  • Add two profile fields, and add data to them both
  • Restrict one, but not the other
  • Save the profile with a user who does not have edit permissions to the field
  • The data in the restricted field is deleted

This most likely happens due to a known "feature" of Profile in D6 core (see this comment on api.drupal.org), but I think it should be handled here, since it will never be changed in core.