Add a message when user has unchecked “Allow others to send me messages”


Home Forums Front End PM PRO Add a message when user has unchecked “Allow others to send me messages”

This topic is: Resolved
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #41532
    jilllynndesign
    Participant

    Hi! I’d like to add a message on the same page as the [front-end-pm] shortcode.

    In my page template, I’ve added the following, but it doesn’t work. The message doesn’t display regardless of whether “Allow others to send me messages” is checked or not.

    if ( ! fep_current_user_can( 'send_new_message')) {
    	echo '<p><em>Your current settings don’t allow you to receive messages.</em> <a class="text-link" href="/my-account/messages/?fepaction=settings">Update your settings</a></p>';
    }

    Any thoughts?

    #41535
    Shamim Hasan
    Keymaster

    You can also remove that settings if you want. Please follow https://www.shamimsplugins.com/support/topic/remove-setting/#post-12519

    If you want to show message if that settings is unchecked Please use following code

    if ( ! fep_get_user_option( 'allow_messages', 1 ) ) {
    	echo 'Your message here';
    }
    
    #41537
    jilllynndesign
    Participant

    Works perfectly. Thank you!

Viewing 3 posts - 1 through 3 (of 3 total)

You need to purchase ‘Front End PM PRO’ to create topic in this support forum.

If you already purchased ‘Front End PM PRO’ please LOGIN.