In nodeprofile_user('insert') :

if ($types = nodeprofile_get_settings('register')) {
  $new_account = $account; //this will be used on nodeapi op submit to set the correct author uid
  subform_element_submit();
}

nodeprofile_get_settings('register') might be something like array('type1' => 0).
meaning you should probably array_filter it before testing it has values

Comments

fago’s picture

Status: Active » Fixed

hm, I wouldn't call it abusive, as it doesn't harm anyway, but of course you are right :)

that happened because 0 != array() although 0 == FALSE and array() == FALSE - really interesting!
Anyway, fixed in 5.x, thanks.

yched’s picture

actually it was breaking my own personal hack on usernode / nodeprofiles (bad...)
But 'abusive' was not the right word, it's true.

Anyway, thanks for fixing this so quickly !

Anonymous’s picture

Status: Fixed » Closed (fixed)