• Hello,

    I need to install this plugin to capture CF7 data into a databse. WP will have several admin users, but only 2-3 of them should be able to view the form data saved to the DB.

    I read about plugins that add access control features to WP, but they seem very complex to configure. Is there something simpler that can be done?

    Thanks!

    http://wordpress.org/extend/plugins/flamingo/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Takayuki Miyoshi

    (@takayukister)

    Add this to your theme’s functions.php file:

    add_filter( 'flamingo_map_meta_cap', 'your_flamingo_map_meta_cap' );
    
    function your_flamingo_map_meta_cap( $meta_caps ) {
    	$allowed_users = array( 'user1', 'user2', 'user3' );
    
    	if ( ! in_array( wp_get_current_user()->user_login, $allowed_users ) )
    		$meta_caps = array();
    
    	return $meta_caps;
    }

    Edit the $allowed_users = array( 'user1', 'user2', 'user3' ); line as you like.

    Thread Starter nuroweb

    (@nuroweb)

    Thanks a lot for the quick response. I’ll try that out!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to restrict form data access to certain users?’ is closed to new replies.