• Resolved j60wp

    (@j60wp)


    Hi

    We are testing your plugin on a development site for potential use in a choir’s website.

    The site is mainly managed and built in Oxygen builder but we are a bit confused why the path /user/(username) is always accessible even when not the user is not logged in.

    We only want profiles and user info to be available to logged in users and not the public as a whole – are we missing something?

    Thanks

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter j60wp

    (@j60wp)

    Hold that thought.

    We added restrict access to post and set the permissions to be only admin user and choir member type and that appears to stop Joe Public being able to see them.

    Is that correct?

    Thread Starter j60wp

    (@j60wp)

    Also

    Is it possible to hide the “posts” and “comments” links in the profile form?

    The use of the plugin is for users to have a profile but mainly for them to read content not contribute to it.

    We also need to add a custom field that is an auto generated id for the profile, it’ll be used by them as a banking payment reference but I can’t find out much about custom fields in the documentation.

    Thanks

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @j60wp

    1. You can restrict the user/profile page. Just edit the page and then see the “UM Content Restriction” section at the bottom part of the page.

    2. When you restrict a post or post categories/taxonomy to logged-in users only, the public/non-logged-in users will not see them.

    3. To hide the posts and comments tabs, please go to WP Admin > Ultimate Member > Settings > Appearance > Profile Menu.

    4. For the auto-generated ID, you will need to customize it with UM Hooks on your end. Do you need to display that auto-generated ID to the Profile form?

    Regards,

    Thread Starter j60wp

    (@j60wp)

    Brilliant, thank you

    On point 4, the ID is simply a generated once, read only, unique reference that the user sees in the their profile.

    Might sound a bit odd but will be used as the reference when they pay their membership fees through a bank account. The choir has a lot of older members who pay their subs through bank and standing orders so we jsut want a way to identify them easily as some have the same names.

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @j60wp

    You can try this code snippet to generate a unique account ID:

    add_action("user_register","um_012022_generate_unique_account_id");
    function um_012022_generate_unique_account_id( $user_id ) {
       $unique_account_id = 'C-' . str_pad( $user_id, 5, '0', STR_PAD_LEFT );
       update_user_meta( $user_id, "um_unique_account_id", $unique_account_id );
    }

    The above code will generate a unique id. Example: C-000123, C-000124 etc. The ID will be saved in the wp_usermeta table with the meta key um_unique_account_id on Registration.

    You can add the code to your theme/child-theme’s functions.php file or use the Code Snippet plugin to run the code.

    Regards,

    • This reply was modified 4 years, 4 months ago by Champ Camba.
    Thread Starter j60wp

    (@j60wp)

    Hi

    Thank you very much for all your help.

    I’ve got that code working and it’s adding the id to the DB and I’ve also got it showing in the profile.

    Really apprecaite your help.

    • This reply was modified 4 years, 4 months ago by j60wp.
    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @j60wp

    Thanks for letting us know.

    Regards,

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

The topic ‘User Profiles always visible’ is closed to new replies.