Skip to:
Content
Pages
Categories
Search
Top
Bottom

Securing User Dashboard


  • sethduke
    Participant

    @sethduke

    I’m having an issue securing the Dashboard page visible to users. I’m setting up a private intranet and have secured all of the content pages, but the dashboard is still visible to anonymous users. We’ve tried the Forced Login Plugin which creates an issue with too many redirects. Is there a fix or workaround for this?

Viewing 1 replies (of 1 total)

  • shanebp
    Moderator

    @shanebp

    This is a WP question, not specific to BP.

    Try:

    function seth_no_dashboard() {
    
       if ( is_admin() ) {
    
          if ( ! is_user_logged_in() ) {
    
    	wp_safe_redirect( site_url() );
    	exit;
    
          }
       }
    }
    add_action( 'wp_ready', 'seth_no_dashboard' ); 
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar