[wp-trac] [WordPress Trac] #43890: Allow Admin to Skip e-mail confirmation for Export/Anonymization
WordPress Trac
noreply at wordpress.org
Sat Jun 15 19:00:30 UTC 2019
#43890: Allow Admin to Skip e-mail confirmation for Export/Anonymization
-------------------------------------------------+-------------------------
Reporter: xkon | Owner: xkon
Type: enhancement | Status: assigned
Priority: normal | Milestone: 5.3
Component: Privacy | Version:
Severity: normal | Resolution:
Keywords: has-patch dev-feedback needs- | Focuses:
design-feedback |
-------------------------------------------------+-------------------------
Comment (by birgire):
Few random thoughts:
It looks like {{{$request_confirmation}}} is binary, what about using
{{{true/false}}} instead of {{{'yes'}}} vs {{{'no'}}} or {{{''}}} strings
?
Personally, I like the former better:
{{{
wp_create_user_request( ..., true );
wp_create_user_request( ..., 'yes' );
}}}
In that case one might use:
{{{
$request_confirmation = ( 'yes' === $_POST['request_confirmation'] );
}}}
instead of
{{{
$request_confirmation = sanitize_text_field(
$_POST['request_confirmation'] );
}}}
Another thing, how should we handle missing
{{{$_POST['request_confirmation']}}} ?
Should it trigger an invalid action error?
Since this is a binary option, would a checkbox be suitable here, instead
of a dropdown?
It looks like unit tests will need an update.
Cheers
--
Ticket URL: <https://core.trac.wordpress.org/ticket/43890#comment:24>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list