What a pain in the plumbers crack that profile code... >_<
Dealing with what we have now, I guess this should work:
'input_validate' => create_function('&$value', '
global $cur_profile;
if (empty($value))
{
require_once(SUBSDIR . \'/Members.subs.php\');
$member = getBasicMemberData($cur_profile[\'id_member\'], array(\'authentication\' => true));
// No previous answer was saved, so that\'s all good
if (empty($member[\'secret_answer\']))
{
return true;
}
// There is a previous secret answer to the secret question, so let\'s put it back in the db...
else
{
$value = $member[\'secret_answer\'];
// We have to tell the code is an error otherwise an empty value will go into the db
return false;
}
}
$value = $value != \'\' ? md5($value) : \'\';
return true;
'),
But I'm slightly sleepy and create_function always give me a headache...