Dawson College

Forum Replies Created

Viewing 7 posts - 16 through 22 (of 22 total)
  • Author
    Posts
  • in reply to: Users in specific role see and respond as one user #20857
    Dawson College
    Participant

    I want all users in the role to be added automatically. I don’t want to manually add people.

    I’m sorry. I’ve read the page you linked to many times and I was under the impression I properly configured it.

    in reply to: Users in specific role see and respond as one user #20852
    Dawson College
    Participant

    Hey there,

    Thank you for the code. I added it to my site and now the student in the subscriber role can now see the group, Admissions and can send the message.

    My issue now is my Admissions team in the role of Registrar can not see any messages from the students.

    Also, a second student can’t see the message the first student sent, which is perfect.

    Please see the screenshots at the following link.

    https://imgur.com/a/ONM8lC0

    in reply to: Users in specific role see and respond as one user #20816
    Dawson College
    Participant

    Hi Shamim,

    I’ve create the groups I think are required. I logged in as a student and I’m getting an empty To: field and a checkbox for Group but then the message “You are not member to any group” appears.

    Please see the attached recipient and security pages.

    I’m looking for all subscribers to message only the “support” ( Admissions ) group. Also, no student should see or message any other student.

    Do I need to pre-fill the To: input box with a specific user or something else?

    Thank you.

    Attachments:
    You must be logged in to view attached files.
    in reply to: Search for messages by username #20746
    Dawson College
    Participant

    Hey Shamim,

    What are your thoughts on this? This seems to get the job done.

    
       add_filter( 'fep_filter_message_query_sql', 'fep_filter_message_query_sql', 10, 2 );
    
       /**
         * Allows for the searching of student number on the message list page
         *
         * @param $sql
         * @param $class
         * @return mixed
         */
        function fep_filter_message_query_sql( $sql, $class ) {
    
            if( isset( $_GET['fep-search'] ) && ! empty( $_GET['fep-search'] ) &&
                preg_match( '/^\d{7}$/', trim( strtolower( $_GET['fep-search'] ) ) )
            ) {
    
                    global $wpdb;
    
                    // Inject DISTINCT cause the join seems to bring duplicate records
                    $sql = str_replace( 'SELECT ', 'SELECT DISTINCT ', $sql );
    
                    // Inject the users table join
                    $sql = str_replace( ' WHERE', ' INNER JOIN ' . $wpdb->users . ' on adm_fep_messages.mgs_author = ' . $wpdb->users . '.ID WHERE', $sql );
    
                    // Inject for the where on user_login = ?
                    $sql = str_replace( ' ORDER BY',' OR ( ' . $wpdb->users . '.user_login = "' . esc_sql( trim( strtolower( $_GET[ 'fep-search' ] ) ) ) . '") ORDER BY', $sql );
            }
    
            return $sql;
        }
    
    in reply to: Search for messages by username #20718
    Dawson College
    Participant
    This reply has been marked as private.
    in reply to: Notify of update via WordPress #20709
    Dawson College
    Participant

    Yes. I have added the license key.

    My server is secured so that you could not connect to it, but my site can connect outbound.

    in reply to: Sending messages for large numbers of users #18341
    Dawson College
    Participant

    Can this announcement be target to 800 users out of our 20,000 that can login to the site?

Viewing 7 posts - 16 through 22 (of 22 total)