eZ Publish user management

We saw how eZ Publish roles and policies work in Chapter 6, when we created a new section, and then in Chapter 8, when we added specific policies to a forum channel.

But we never talked about how the CMF manages users.

User accounts

Every time that we have to deal with a user, we will find the relative content object inside the User accounts tab.

User accounts

On the left-hand sidebar of this section of eZ Publish, we can see the user groups that have been created. Also, we can see in the main content area all of the information for the area.

If we click on a user group on the left, the central area will be expanded to show an Assigned roles box.

User accounts

This contains all of the roles applied to the group, and specifies if there are any section or subtree limitations.

Within this box, we can find the Available policies box, as shown here:

User accounts

This box is a drill-down of the first one, and all of the relative policies of the applied roles are shown in it.

User accounts

The last box, called Sub items, is the container of all of the users that belong to the group.

As for the other content object, a user can be disabled by adding an 'invisible' tag, and edited, directly from here.

Creating a new user

eZ Webin allows us to create users in two ways: via the predefined registration form in the frontend, or from the administration backend.

The following screenshot shows how the registration form on the frontpage of the site appears, using the predefined eZ Webin template with our CSS:

Creating a new user

When the users register themselves via the frontend, they will be saved as Anonymous Users and the default roles will be applied.

Otherwise, in order to create a new user from the backend, we have to log in from the backend interface located at http://packtmediaproject/index.php/dev_panel. Now, from the User accounts tab, we have to open the group into which we want to place the new user.

Here, we can use the drop-down menu at the bottom of the content area to create a new User or a User group content object.

The following screenshot shows the backend interface used to create a new user:

Creating a new user

When we create a new user via the backend, we have to provide the same data as we do when creating a user via the frontend. The only difference is that, in this case, we can create the user in the exact group that we want.

Tip

It's very important to remember that eZ Publish checks for a unique username and email address. So two different users cannot have this information duplicated.

Extending eZ Publish user classes

When we created the new user, we noticed that we can create only Users or User groups; but we defined our profile content class to manage the editors in Chapter 3. To add this content class to the User accounts content area, we will need to update it.

Open the Setup tab, and then click on the Classes link in the sidebar. Then, click on the Content class inside the Class group box, and select the Profile content class, in order to see its information. At the bottom of the page, we can see the Member of class groups box, as seen in the following screenshot:

Extending eZ Publish user classes

In this box, select Users from the drop-down menu, and then click on the Add to class group button. From now on, we'll be able to create new profile editors inside the Editors user group.

Managing a user

Sometimes we may need to delete a user, for example, an employee who leaves our company, or an external user who wants to delete his own profile.

In this case, we can proceed in two ways. We can either delete the user permanently, or disable the user by maintaining the author's attributes on the content that he or she created.

Disabling a user

To disable a user, we have to open the User accounts tab in the backend, and then browse in the categories for the user that we want to disable.

Disabling a user

Open the user page, and in the Preview page, click on the Configure user account settings link. The following window will be displayed:

Disabling a user

Deselect the Enable user account checkbox, and save your changes by clicking on the OK button.

Deleting a user

To delete a user, we have to select the user from the User group page, and select the relevant checkbox.

Deleting a user

Next, when we will click on the Remove selected button, the system will ask us how to proceed.

Deleting a user

Click on the OK button and the user has now been deleted.

The eZ Webin predefined groups

As we saw when we created the new interface and content classes, the eZ Webin packages come with a handful of preconfigured features.

In this case, the package automatically creates five different groups, along with the relevant roles and privileges.

We can see these groups in the following table:

Administrator users

The users who belong to this group are superusers, having access to all of the functionality of eZ Publish.

Editors

These users can manage the content of the CMF.

Partners

These are member users with the privileges necessary to use a reserved area of the frontend.

Members

These are anonymous users who have registered themselves. These members can manage their personal profile page.

Anonymous users

Visitors who are not logged in. They can read everything that is marked as public.

Tip

For all of the users, irrespective of whether they are logged in or not, eZ Publish will create and manage a session cookie that allows the developers to create complex interaction features in their products.

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

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