Skip to:
Content
Pages
Categories
Search
Top
Bottom

Proper way to throw error with BP with group creation


  • symbioses
    Participant

    @symbioses

    Hello,

    I’m about to create a plugin that extend the group functionality and I created a filter that use ‘groups_create_group_step_save_group-details’ but I would like to display an error message and redirecting to the errorneous page.

    So far I have something like

    bp_core_add_message( ‘An error occured’, ‘error’ );
    bp_core_redirect( bp_get_group_permalink() .’create/step/group-details/’ );
    (some saving code)

    The error is displayed on the correct page, but the group is still created.

    What is the “proper” way to “cancel” the group creation, and display error message?

    Thanks a lot!

  • The topic ‘Proper way to throw error with BP with group creation’ is closed to new replies.
Skip to toolbar