Login settings

From MoodleDocs

New feature
in Moodle 5.2!

To assist administrators manage their login preferences for their organisation, from Moodle LMS 5.2 several related configurations have been collated in one administration page, making them easier to find and update.

This page is accessed from Site administration > General > Login > Login settings.

For new sites this page is where you can change the default settings. For existing sites that have upgraded, any existing modifications you have made will remain unchanged, and you can modify them on this page.

Moodle LMS 5.2 introduces a new modern login page, with a default welcome message and a default image. These can be customised to meet your organisation's needs; please see the following sections.

Note: If you have an existing site with custom login instructions or a custom login page image, these will persist after upgrading and won't be overwritten.

Settings

Force users to log in

By default, the site home and course listings can be read by people without logging in. Enable this setting to require login before users can do anything on the site.

Self registration

Select Email-based self-registration from the Registration dropdown if you wish to use Email-based self-registration on your site. (Note: This setting was formerly on the Managing authentication screen.)

Allow log in via email

If enabled, users can log in using either their username or their email address.

Autofocus login page form

Automatically focuses the username field when the login page loads. This improves usability for most users, but automatic field focusing may be considered an accessibility issue for some.

Guest login button

Show or hide the guest login button on the login page. Hiding it disables guest access to the site, however logged-in users can still enter courses that allow guest access without enrolling.

Alternate login URL

Set a custom URL to use as the login page for the site. Use with care: an incorrect URL can lock you out of your site. Leave blank to use the default login page.

Display manual login form

If all users authenticate via a method such as OAuth 2 that does not require a username and password, you can hide the manual login form. Note that users with manual accounts will not be able to log in.

If you hide the manual login form then find you cannot log in, you can display it again using the command line:

php admin/cli/cfg.php --name=showloginform --set=1

Forgotten password URL

If lost password handling is managed entirely outside of Moodle (for example, by a help desk), enter the URL of that service here. This disables all of Moodle's built-in password recovery options.

Instructions

Custom text to display as login instructions on the login page. Leave blank to use the default instructions. See Login page message and instructions below for more detail.

Enable reCAPTCHA for login

Adds a visual or audio confirmation element to the login page to reduce the risk of automated login attempts. Requires reCAPTCHA site and secret keys (see below).

Enable reCAPTCHA for forgot password

Adds a reCAPTCHA element to the forgot password page to reduce automated attempts.

ReCAPTCHA site key

The site key provided by Google reCAPTCHA for your domain. Required to display the reCAPTCHA element.

ReCAPTCHA secret key

The secret key provided by Google reCAPTCHA. Used to communicate between your Moodle server and the reCAPTCHA service.

Password visibility toggle

Adds an icon to the password field on the login page so users can click to show or hide their password.

Login page message and instructions

To add custom login instructions, type your text in the Instructions field.

login instructions admin settings

Note that this message only applies to authentication methods, such as Manual and Self-registration, that use the login page.

Multiple languages

  1. Go to Site administration > Language > Language customisation
  2. Select a language then click the button 'Open language pack for editing' then click continue
  3. Select moodle.php and enter loginsteps as string identifier then click 'Show strings'
  4. Enter your custom login instructions in the local customisation text box
  5. Click the button 'Save changes to the language pack' then click continue
  6. Repeat the steps for other languages

Login page image

How the login page image is displayed is based on the currently selected theme for your site. For the Boost theme, go to Site administration > Appearance > Themes > Boost, click the cog and upload a new image for the Login background.

boost theme login image setting

See also