Open turtlepod opened 7 years ago
$data
is the same as $_POST
here.
Yes. I'm aware of that.
hmm. I think probably better remove the $_POST in that function and simply use $data (merge them). and than make it filterable (at the top) so we can manipulate the $data based on other submitted data, etc. (just an idea)
I'm not sure that allowing altering that $data
is a completely safe choice. I don't mind making a comment that states that $_POST
is the same as data, so that developers who hook this area know to use $_POST
but I think allowing filter the data is a risk that developers could then alter or corrupt the data structure we're expecting in $data
and since this is the user's login, email, and password, could lead to the possible alteration of the customer's chosen login details, which would make for a poor user experience (by accident, more than likely).
In "edd_process_register_form" and "edd_pre_process_register_form" it's best to add the
$data
var in the hook, so it will be more useful. https://github.com/easydigitaldownloads/easy-digital-downloads/blob/master/includes/login-register.php#L146 https://github.com/easydigitaldownloads/easy-digital-downloads/blob/master/includes/login-register.php#L180example code: