Title: robskrob's Replies | WordPress.org

---

# robskrob

  [  ](https://wordpress.org/support/users/robskrob/)

 *   [Profile](https://wordpress.org/support/users/robskrob/)
 *   [Topics Started](https://wordpress.org/support/users/robskrob/topics/)
 *   [Replies Created](https://wordpress.org/support/users/robskrob/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/robskrob/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/robskrob/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/robskrob/engagements/)
 *   [Favorites](https://wordpress.org/support/users/robskrob/favorites/)

 Search replies:

## Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)

 *   Forum: [Everything else WordPress](https://wordpress.org/support/forum/miscellaneous/)
   
   In reply to: [How to assign tag to custom post type in wordpress?](https://wordpress.org/support/topic/how-to-assign-tag-to-custom-post-type-in-wordpress/)
 *  Thread Starter [robskrob](https://wordpress.org/support/users/robskrob/)
 * (@robskrob)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/how-to-assign-tag-to-custom-post-type-in-wordpress/#post-13668646)
 * Ok I got an answer to this here [https://wordpress.stackexchange.com/a/378254/135177](https://wordpress.stackexchange.com/a/378254/135177)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP 2FA - Two-factor authentication for WordPress] Different Redirect After User Completes WP 2FA Setup](https://wordpress.org/support/topic/different-redirect-after-user-completes-wp-2fa-setup/)
 *  Thread Starter [robskrob](https://wordpress.org/support/users/robskrob/)
 * (@robskrob)
 * [6 years ago](https://wordpress.org/support/topic/different-redirect-after-user-completes-wp-2fa-setup/#post-13021649)
 * Hi [@robert681](https://wordpress.org/support/users/robert681/) thank you for
   your reply.
 * Just to be clear — when someone signs into the wordpress dashboard and creates
   two factor authentication for their account using the [whitesecurity 2FA wordpress plugin](https://www.wpwhitesecurity.com/wordpress-plugins/wp-2fa/),
   the plugin redirects the user by default to the network page whose path is /wp/
   wp-admin/network/. At least, this has been my experience in using your plugin
   and setting up wordpress uses with 2FA.
 * In my wordpress app, I have set it up such that only the super admins and administrators
   have access to the network page. Therefore, when either an Editor, Author, Contributor
   or Subscriber signs into the wordpress admin and after setting up their account
   with two factor authentication with the [whitesecurity 2FA wordpress plugin](https://www.wpwhitesecurity.com/wordpress-plugins/wp-2fa/),
   wordpress shows these users a page that says, “sorry, you are not allowed to 
   see this page.” because the plugin, as stated above, redirects them to the network
   page, from which I have blocked them. I only need super administrators to view
   the network page.
 * The solution I came up with is the following. I use the `admin_init` hook to 
   redirect users away from the network page and to the wordpress dashboard only
   if the current page is the network one and they are not a super admin:
 *     ```
       add_action('admin_init', function() {
         // Only allow super admin to view network settings page
         if ( is_network_admin() && !(is_super_admin())) {
           wp_redirect("/wp/wp-admin/");
           exit;
         }
       });
       ```
   
 * This allows the whitesecurity 2FA plugin to redirect users to the network page
   after setting up 2FA while not creating a weird / broken experience for my users
   who are not allowed to view that page.
    -  This reply was modified 6 years ago by [robskrob](https://wordpress.org/support/users/robskrob/).
    -  This reply was modified 6 years ago by [robskrob](https://wordpress.org/support/users/robskrob/).
    -  This reply was modified 6 years ago by [robskrob](https://wordpress.org/support/users/robskrob/).

Viewing 2 replies - 1 through 2 (of 2 total)