Unwanted Eventbrite API User Key appearing on user profile edit for all users

Home Forums Ticket Products Eventbrite Tickets Unwanted Eventbrite API User Key appearing on user profile edit for all users

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #200810
    elastic
    Participant

    Hi,
    We have bbPress installed on a website which allows user profile editing and now with Eventbrite Tickets installed the “Eventbrite API User Key” field is showing up on the user profile edit page. We don’t want this appearing to forum users who are set with Role “Subscriber”. Is there a way to stop this showing up for everyone except Role “Administrator”?
    thanks
    Ian

    #204498
    Barry
    Member

    Hi!

    Would a short snippet like this (which you could add to your theme’s functions.php file) help?

    add_action( 'admin_init', 'hide_eventbrite_profile_field_for_non_admins' );
    
    function hide_eventbrite_profile_field_for_non_admins() {
    	if ( ! in_array( 'administrator', wp_get_current_user()->roles ) )
    		define( 'EventBriteProfileDone', 1 );
    }
    #207018
    elastic
    Participant

    Many thanks Barry, that worked perfectly 😀
    regards
    Ian

    #207350
    Barry
    Member

    Awesome, glad we could help.

    I’ll go ahead and close this thread since it sounds like we’re all good here but I just wanted to mention that we’re always interested in feedback on people’s experiences with The Events Calendar – so if you wanted to leave a review we’d love to hear from you 🙂

    Thanks again!

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Unwanted Eventbrite API User Key appearing on user profile edit for all users’ is closed to new replies.