Skip to:
Content
Pages
Categories
Search
Top
Bottom

[Resolved] Need a plugin to require xprofile fields


  • samdobrow
    Participant

    @samdobrow

    I am using BP Private pages to keep the site private until members register. Now I want to require new members to complete their profile information before being granted further access to the site. I have several tabs of information including photos built for the xprofile fields. The ideal situation would be that the user is automatically granted access when they complete all the required fields on the xprofile.

    Has anyone done this? How?

Viewing 5 replies - 1 through 5 (of 5 total)

  • colabsadmin
    Participant

    @colabsadmin

    Have you asked the BP Private plugin devs? Seems that you could edit their code to do a check of each required field. They’re probably only checking if a person is logged in.

    if (!bp_is_my_profile() && !bp_custom_get_member_list_xprofile_data('Company') && !bp_custom_get_member_list_xprofile_data('Location'))

    The unfortunate part of this is that check would have to be done on every page causing unnecessary processing time to every page load, unless you set a cookie or a single flag in the db. But then what happens if a user removes the information in one of the fields at a later date.


    samdobrow
    Participant

    @samdobrow

    Good points.

    Initially, I’d be glad to have a check to require completion of all the xprofile fields then automatically (approve) change the user role to allow more access.

    Another option might to be to grant access to the xprofile fields while in a pending status, then manually approve when the profile is completed. Currently, I have an intercept in the login routine that logs users out if their status is pending and redirects them to a “Pending Approval” page. Perhaps I could leave them logged in and force the redirect to the xprofile page. Any ideas on how to form the correct url to the xprofile page? Will all xprofile tabs be accessible under the single url?

    Thoughts? Ideas?


    bp-help
    Participant

    @bphelp

    @samdobrow
    Have you tried:
    https://wordpress.org/plugins/bp-force-profile/
    It’s been awhile since it was last updated but it should still work.
    Good luck!


    samdobrow
    Participant

    @samdobrow

    Yes, that is exactly what I needed! thanks @bphelp!

    It works with WP 4.0 and BP 2.0.2

    Requires a small tweak of the CSS to position the warning message over an area of the screen not needed for data entry or navigation. I added this to the theme CSS:

    #bp_fp_notice {
    height:450px; /* height of header graphics area in theme */
    overflow: auto; /* Allows scrolling of message in header */
    }

    I also use this with social login which makes login and registration easy but requires users to complete any required field including those created with xprofile plugin.


    bp-help
    Participant

    @bphelp

    @samdobrow
    Glad I could point you in the right direction and thanks for sharing your CSS solution that others may find helpful as well.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Resolved] Need a plugin to require xprofile fields’ is closed to new replies.
Skip to toolbar