http://www.simplemachines.org/community/index.php?topic=538642.0
This is present in Elkarte as well. It always refuses your secret answer if you do that procedure, no matter if you leave it blank or type the correct reply.
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... :-\
This deserves a like :D
Then use closures. I think a full disclosure is always nice: that was a horrible pun.
Well, I hope they get it right on SMF as well, not too confident tbh xD
Another of spuds' censoring. LOL
1.0 is (still) with create_functions, so for consistency it's better to fix it like that, 1.1 is another story. ;D
Censorship done right!
Did Spuds censor his name, too?
Not recently, that I know of, but several other folks could if they want :D
They are still messing with the code at sm.org instead :( shrug
Tracked: https://github.com/elkarte/Elkarte/issues/2178