Table des matières
User Mnet Hosts block (User network navigation): User guide
Introduction
The User Mnet Hosts block (My network sites - non-standard) is similar to the “Network sites” block (Mnet Hosts), but adds individual access control management for each MNET host.
Indeed, the standard block provides unconditional access to all the sites opened in SSO in Moodle, but provides no way to control access “at the source” (an access control can be done on arrival through a hardly accessible technical function, mainly intended to set up exceptional “bans”).
Additional profile fields allow controlling these accesses.
The block has its own tools to generate the additional profile fields needed to control access in the network.
The accessory Group Network block will make it easy to delegate the granting of access to non-administrator roles.
Preparing the block
For the block to work, a profile field driving network access must be generated for each MNET host known in Moodle's network environment. These fields can be created by hand, following these naming rules:
- The field name must start with “access”
- The field name ends with the host stem, filtered of any non-alphanumeric character, and converted to uppercase.
Examples:
- For a remote Moodle: http://clone1.mydomain.com ⇒ accessCLONE1
- For a remote Moodle: http://sub1.sub-domain.mydomain.com ⇒ accessSUB1SUBDOMAIN
The fields are preferably to be added to the category defined for the “network access control fields”
Examples of two custom profile fields created in the “Access attributes category” (locked and hidden fields, whose name starts with “access” and ends with the host stem in uppercase)
Alternatively, the central configuration of the block provides a tool (Synchronise the access control fields) to automatically generate the missing fields, based on the analysis of the MNET environment.
Sending and receiving Mnet hosts profile fields
Path: Site administration/Moodle network/ Profile field
You can configure here the list of profile fields sent and received by MNet when creating or modifying user accounts. You can also change this individually for each MNet peer.
![]() | ![]() |
|---|
Default: city, country, lang, timezone, picture, description, mailformat, maildigest, maildisplay Note: The following fields are always sent and are not optional: username, email, firstname, lastname, auth, wwwroot, session.gc_lifetime, _mnet_userpicture_timemodified, _mnet_userpicture_mimetype
Adding the block
Then add an instance of the User Mnet Hosts block (instead of the standard Mnet Hosts block) on your Moodle site to limit the view to the authorised Moodle instances.
General component settings
Path: Your Moodle site/admin/settings.php?section=blocksettinguser_mnet_hosts
By default, accessing the general settings creates a dedicated custom field category for storing the network access fields, and creates the field representing access to the Moodle platform itself (self).
- Click the “Network access control fields synchronisation” link to reach the administration page Your Moodle site/blocks/user_mnet_hosts/admin.php
- Then click the “Synchronise access fields” button to resynchronise the access fields of the partners added or defined in the Moodle network.
Screenshot of the synchronisation return message:
Credits
- Valéry Frémaux (valery@activeprolearn.com) - Development and tests
- Florence Labord (florence@activeprolearn.com) - Documentation and tests
Back to the User Mnet Hosts block - Back to plugins index - Back to catalogue



