Users - this is one of the main features of Drupal, we can create, delete users. Users on the site leave comments, reviews, materials. Drupal has user moderation systems. And this is only part of the functionality of Drupal, so we need to understand the admin panel of Drupal in order to manage all this.
Let's go to Account settings:
On the account settings page, you can change the settings of newly created users, as well as notifications that are sent to users via email with various actions. You can also expand the capabilities of registration, login, password recovery and other user settings using modules. We will install some of these modules and consider their configuration and operation.
CONTACT FORM SETTINGS
Drupal 8 has a redesigned contact module, now it almost reaches (and maybe even surpasses) the Webforms module, which was popular in Drupal 7. For each user, we can add a contact form. For example, by default, the admin has the form:
For other users, the form will be located at
for example, the path could be /user/1234/contact.
Here we can write what name the anonymous user will have, by default it is anonymous
ROLE OF THE ADMINISTRATOR
We can create an additional role, for example, the Moderator, and make it the administrator of the entire site, but I would not do this, leave the opportunity to break your site only to the administrator :)
REGISTRATION AND REMOVAL
It’s worth considering here whether there will be new users on your site? If your site is a site for your company and only you will add materials to the site, and users can only send you messages via the contact form, then disable the ability to create new users. By default, users can register on the site, but they will be blocked until you enable them on the page of all users:
If you leave the opportunity to register, then any bot on the Internet will try to do this. If you don’t have captcha in the form, then bots will quickly create tens (or maybe hundreds) of thousands of accounts until your site lays down safely. So turn off registration or set captcha.
If you already have a bunch of spam accounts and they created materials, check the box so that the materials and their materials will be removed from the publication along with the accounts.
You can also disable the Enable password strength indicator if you do not care about the complexity of the user password.
If you uncheck Require email verification when a visitor creates an account, then the user will not have to confirm his email. And if you leave a checkmark, then upon registration the user will be sent a link to confirm the email, which the user must go through, thereby confirming your email.
Notification email address
You can specify an email to notify the administrator if you want this email to be only for these notifications (for example email@example.com). Emails Here you can correct the messages that are sent to users at various events. Pay attention to the text in square brackets, these are tokens, in the letter they will be replaced by data from the site (login, confirmation link, site name)
As in 7th Drupal, we can manage user fields. We can attach the field Phone, Name and Surname, User address, so that the user can fill them out when registering or editing his profile later. By default, we only have a field for user image, let's add another field Phone:
We need to select the type of field, we can install the module to verify the correctness of the input of the Phone:
But we can not do this and rely on the fact that the user fills the phone correctly (on real sites, still use the module) and select the text field type (plain):
Field settings, with Maximum length, leave as is 255 characters. But we will change further settings.
Let's make this field mandatory and display it on the registration page:
Now, among all the other fields, on the user registration page, there will also be a telephone.
If you log out now
and go to the user registration page, you will see a long registration form.
This needs to be fixed. The next tab Manage form display will help us with this.
Now let's drag the fields Timezone, Contact settings, Language settings, Picture down in the Disabled field. Drag and save. Now on the registration form there will be only three fields Email, password and phone:
Fine! I like this shape. But there is one more trouble, this is the user page.
Now we display the Phone fields and user registration time there.
Let's remove the user registration time and leave only the phone. To do this, use the following Manage display tab.
As well as with the form settings, we drag the fields down to Disabled. So now only the Phone field will be displayed.
Well, here we’ve figured out editing user settings in Drupal 8. There are also many modules for improving the functionality of users, all of them are free and are available on drupal.org.