[buddypress-trac] [BuddyPress Trac] #4747: Add a TOS checkbox for registeration

buddypress-trac noreply at wordpress.org
Sat Mar 13 20:09:29 UTC 2021

#4747: Add a TOS checkbox for registeration
 Reporter:  mahdiar           |       Owner:  (none)
     Type:  enhancement       |      Status:  reopened
 Priority:  normal            |   Milestone:  8.0.0
Component:  Extended Profile  |     Version:
 Severity:  normal            |  Resolution:
 Keywords:  needs-patch       |
Changes (by imath):

 * component:  Core => Extended Profile



 Thanks again for this "initial draft" 😁.

 I'll start my feedback with some generic advices:
 - Please use the `--no-prefix` option when generating the patch, in
 particular when there's a new file (it avoids this new file to be located
 outside of the needed folder (`b/src...`).
 - Let's use strict comparisons `===` instead of `==`.

 Then about the feature:
 1. The fact the user agreed to the terms of service **should be saved into
 the db**. It doesn't seem to be the case (at least when I tested the patch
 it wasn't saved).
 2. There should be an option to disable signup if the checkbox is not
 checked, just like we're doing for the GDPR checkbox.
 2. This field should have a different behavior according to whether the
 user already agreed or not. If the user agreed, it should only display a
 mention "You agreed to %s" where %s would link to the page.
 3. This field should not support custom visibility neither autolink.
 4. This field should only be displayed to the self user
 5. I don't see the need for adding a new instance of the WP_Editor: the
 field description can be used to add some explanations and we should be
 more restrictive by default and include filters in case people want to
 customize the output (see next point).
 6. We should use a page dropdown to select the TOS page, use the page
 title and the page link to build the checkbox output eg: `sprintf( __( 'I
 agree to %s', 'buddypress' ), '<a href="' . esc_url( get_permalink(
 $page_id ) . '">' . get_the_title( $page_id ) . '</a>' )`
 7. We should think of this new field to be a replacement for how we
 include the GDPR checkbox into the signup form.

 FYI in #7162, the patch is including some improvements to be able to
 customize/disable some feature like custom visibility and autolink. I will
 try to commit these improvements and add some others (eg support WP-Admin
 extended profile, view screen..) so that you'll be able to use them there

 You'll find some other tiny improvements into the .2.patch I've quickly
 built from yours.

 Don't hesitate to ping me if I can help 👌

Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4747#comment:10>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac

More information about the buddypress-trac mailing list