How to activate empty user profile? I am struggling with this for a while. In my setup, every user gets to have the main profile. However if there are all fields empty, the profile is not created.
Problem: It is not possible to access fields in user profile, for example using rules or php. Rules gives error - The variable or parameter is empty.

After editing any of profile fields, the profile is created and available for extracting data.
So is this any sort of bug or is it somehow possible to save/enable even empty profile, to be able to work with fields?

Thank you
A quick fix is to use a bit of custom code to save the profile fields in the time of user creation as empty. Say you have a profile of type of "main". This have to be done while creating the users, find the appropriate hooks here.

Now just create the user's profile with empty values.

// create profile object
  $profile = profile_create(array('user' =&gt; $account, 'type' =&gt; 'main'));
  // populate profile fields
  $profile-&gt;field_firstname[LANGUAGE_NONE][0]['value'] = '';
  $profile-&gt;field_lastname[LANGUAGE_NONE][0]['value'] = '';
  $profile-&gt;field_gender[LANGUAGE_NONE][0]['value'] = '';
  // save profile
  profile2_save($profile);


Ref: here and here

This may solve your problem. if now then let me know.