Custom Table & Model and Author Restriction

Support MB Frontend Submission Custom Table & Model and Author Restriction

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #48395
    Nicholas CoxNicholas Cox
    Participant

    Hi,

    When editing custom models and tables through the front end submission shortcode, is there a way to restrict the form to only loading when the author is signed in? similar to how you do this for posts/pages. With the message 'You are not allowed to edit this post.'.

    Thanks

    Nick

    #48398
    PeterPeter
    Moderator

    Hello Nick,

    You can restrict the form to display only when the user logged in by using the PHP code and adding a condition to check it. For example: using the WordPress function is_user_logged_in()

    if ( is_user_logged_in() ) {
      //put the form shortcode here
    }

    I hope that helps.

    #48406
    Nicholas CoxNicholas Cox
    Participant

    Hi Peter,

    sorry you may have misunderstood my query, when i say Author i mean that the person who made the custom entry is the only user who can edit there posts. Is there any stored information about the author i can use to hide the custom table entry if they are not the author of the post?

    #48410
    PeterPeter
    Moderator

    Hello Nick,

    Thanks, understood. However, the custom model doesn't have the author like WordPress post to show the entry when the author logged in. I will inform the development team to consider supporting that feature in future updates.

    #48475
    Nicholas CoxNicholas Cox
    Participant

    ok thanks, is there a workaround i can use for now?

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.