Chapter 4: Management of Users and Access Control

In This Chapter

arrow.png Understanding default user management

arrow.png Changing default user behavior

arrow.png Exploring user access to site features

In Chapter 3 of this minibook, I discuss the Network Admin menu you have access to on your Dashboard to manage aspects of your network. In this chapter, I explain how to manage users across the network, including how you can change some of the default management options to suit your needs.

One of the hardest things for new network admins to understand is that although each site is managed separately, users are global. That is, after a user logs in, he is logged in across the entire network and has the ability to comment on any site that has commenting enabled. (See Book III, Chapter 2.) The user can visit the Dashboard of the main site in the install to manage his profile information and access the Dashboard’s My Sites menu to reach sites that he administers. The user also registers at the main site — not at individual sites in the network.

Setting Default User Permissions

When you enable the multisite feature, new site and new user registrations are turned off by default. However, you can add new sites and users from the Network Admin Dashboard. To let users sign up for your network, follow these steps:

1. Log in to the Network Admin Dashboard and then click the Settings menu link.

The Settings page loads in your browser window.

2. In the Registration Settings section, select the User Accounts May Be Registered option (as shown in Figure 4-1).

This setting allows users to register on your network. It also assigns them to the main site as a Subscriber but doesn’t allow them to create new sites.

3. Click the Save Changes button at the bottom of the page.

tip.eps By selecting the Both Sites and User Accounts Can Be Registered option on the Network Admin Settings page, you not only allow users to register a new account, but you also give them the option to create a new site on your network.

9781118383339-fg080401.tif

Figure 4-1: User registration options.

User registration

When signing up, the user is directed to the main site of the installation and then added to one of the child sites. This site may be her site (if she chose to have a site when registering) or an existing site. If it’s any existing site other than the main site, you, as the network admin, must manually add the user to that site. The user who owns the site can manually add users as well if you have enabled the option under the Network Admin Settings to allow site admins to add new users to their sites.

The registration page (see Figure 4-2) is located at http://yourdomain.com/wp-signup.php. This sign-up page bypasses the regular WordPress registration page. (See Book III, Chapter 3.)

9781118383339-fg080402.tif

Figure 4-2: The network sign-up page.

After filling out the form, the user receives an e-mail with a link to activate her account. When she does so, she can immediately log in and manage her details; she is directed to her primary site, which is the main site or Dashboard site if she has no site to administer.

Users can also be added to existing sites in the network. You can always assign users to specific sites on a per-case basis. When you set up a network and enable the Allow Site Administrators to Add New Users to Their Site via the “Users -> Add New” Page option (shown in Figure 4-3), you allow site admins to add other users in the network to their sites. Although the Add New Users setting is turned off by default, you can enable it by selecting the Allow Site Administrators . . . option on the Settings page on the Network Admin Dashboard.

Controlling access to sites

You have a list of all the sites on the network; by default, other users cannot find other sites in the network. Unless you, the network admin, add such ability via plugins, a user cannot navigate from one child site to the next.

9781118383339-fg080403.tif

Figure 4-3: Allowing users to add other users to their site.

The only list provided to a user is the Dashboard’s My Sites menu shown in Figure 4-4.

The My Sites page lists only sites the user is the administrator of, not sites on which the user has a lesser role. Additionally, the My Sites menu has a link for the user to create more sites (if the network admin has allowed it via the Settings menu in the Network Admin Dashboard).

By default, users can create no sites or an unlimited number of sites. You can limit the number of sites a user can create by installing the Limit Blogs per User plugin (http://wordpress.org/extend/plugins/limit-blogs-per-user).

Follow these steps to limit the number of sites your users can create:

1. Click the Network Admin link located at the top left of your Dashboard under My Sites.

2. Hover your mouse over the Plugins menu and click the Add New link.

The Install Plugins page on your Network Admin Dashboard opens.

3. In the Search field, type the name of the plugin, Limit Blogs per User.

9781118383339-fg080404.tif

Figure 4-4: The My Sites page shows sites the user administrates.

4. Be sure that you have the Keyword option selected in the drop-down menu next to the search field, so WordPress knows to search by keywords (not by Author or Tag).

5. Click the Search Plugins button.

6. On the search results page, click the Install Now link for the Limit Blogs per User plugin by Brajesh Singh.

7. Click the Network Activate link on the Installing Plugin page.

The Limit Blogs per User plugin is now active on your network.

8. Click the Settings link in the Network Admin Dashboard

9. Scroll to the bottom of the Settings page to the Limit Blog Registrations per User heading (shown in Figure 4-5) and enter the number of sites that you want to limit your network users to.

The value of 1 allows users to create no more than 1 site, and so on. Additionally a value of 0, or leaving the field empty, allows users to create an unlimited number of sites in your network.

10. Be sure to click the Save Changes button at the bottom of the page in order to save all the settings you’ve configured.

9781118383339-fg080405.tif

Figure 4-5: The Limit Blog Registrations per User option.

Importing users

You may have an existing pool of users you want to add to the network; for example, if you had a website before your network existed where you collected registrations or sign-ups. (Even newsletter programs give you a downloadable list of users you can import into your network.) The Bulk Import Users plugin, available at http://wpmututorials.com/plugins/bulk-import-users, can be used with some plugins mentioned later in this chapter to assign users to various sites in the network. Figure 4-6 shows the Bulk Import Members page with instructions for importing a list of users. Currently, there is no default method of importing users into WordPress without the use of plugins.

9781118383339-fg080406.tif

Figure 4-6: The Bulk Import Users plugin.

Changing Defaults

Depending on your specific needs, you may find yourself wanting to change how users are added to sites, as subscribers, within your network. For example, by default, users cannot add themselves to a random network site without making the request to the network admin or the site administrator of the site they want to be added to. This setup may work fine for most sites, but if you want your users to be able to register with existing sites within your network, then read on because these sections are for you.

Site-specific sign-up

For many people, signing up to the main site and then needing to be added to a child site can be confusing. Plugins, however, can make the process easier and less confusing for everyone.

If you want existing users to be able to add themselves to existing sites on the network, the Add Users widget plugin, available in the WordPress Plugins Directory at http://wordpress.org/extend/plugins/add-users-sidebar-widget, allows them to do so. Install this as a regular plugin, which I outline in Book VII, Chapters 1 and 2.

When the network is activated, the plugin adds a widget on the Widgets page of every user’s Dashboard (hover your mouse over Appearance and then click the Widgets link) — the new widget is called the Add Users widget. The user must drag the widget to the appropriate sidebar to display it on the sidebar of the site where he wants users to add themselves. (If you need a refresher on how to use widgets, see Book VI, Chapter 1.) The site then displays a welcome message in the sidebar with a button labeled “Add Me!” that users can click to allow them to register for the site. (See Figure 4-7.)

remember.eps If the user isn't logged in to the network, the welcome message displays If you want to add yourself to this site, please log in., so remember, only users who are already network members and are logged in can add themselves to network sites by using the Add Users widget.

Changing roles on sign-up

When added to a network or a site, a user is assigned the role of Subscriber, by default. You may want to assign a different role to the user and automatically add him to your other sites in the network. (Book III, Chapter 3 explains roles and permissions.)

9781118383339-fg080407.tif

Figure 4-7: The Add Users widget on a site.

When a user signs up for his own site, for example, you may want to assign him a non-administrator role. You may want to set his role to Editor to restrict the menus he has access to on the Dashboard and to prevent him from being able to use some of the functionality of WordPress. You may want to have new site owners sign up as editors for the sites, giving them fewer permissions on their Dashboard.

The Multisite User Management plugin at http://wordpress.org/extend/plugins/multisite-user-management allows you to set a role other than administrator for new users who choose to have a site of their own. This plugin also allows you to set new user roles on other sites within your network (such as the default Subscriber role).

Locking down menus

Certain user roles have certain permissions (which I outline in Book III, Chapter 3) that give users access to various menus on the Dashboard. However, you may want to close areas that you don’t want users to access.

You can limit access to menus via the Menus plugin available at http://wordpress.org/extend/plugins/menus.

Exploring Default Site Settings

Default settings can control user access to various such things as menus, themes, and the Dashboard. The next few sections discuss the network settings in detail.

Because users cannot add or edit plugins, the Plugins menu is disabled by default. You can still access the Plugins page via the Network Admin Dashboard Plugins menu link, but other administrators cannot.

To enable the Plugins menu for site administrators, follow these steps:

1. On the Network Admin Dashboard, click the Settings menu link.

2. Scroll down to the Menu Settings section.

The check box for the Plugins menu is deselected, which means that users can’t see the menu regardless of their user role.

3. Select the Plugins check box to make the Plugins menu available to site administrators, as shown in Figure 4-8.

4. Save your selection by clicking the Save Changes button.

9781118383339-fg080408.tif

Figure 4-8: Enabling the Plugins menu for site administrators.

remember.eps Similarly, you must enable any themes installed on the network before a site administrator can choose the theme from the Appearance menu. I explain how to do so in Chapter 3 of this minibook.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.142.173.227