Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-66278

Add a callback to add content to print_password_policy

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. Log in as admin
      2. Navigate to Site administration -> Plugins -> Authentication -> Manage authentication plugins
      3. Ensure that the "Email-based self-registration" plugin is enabled
      4. Set the "Self registration" setting to "Email-based self-registration"
      5. Create a file auth/manual/lib.php

        <?php
        function auth_manual_print_password_policy() {
         return[ "this is awesome"];
        }
        

      6. Purge caches:

        php admin/cli/purge_caches.php
        

      7. Add the following in config.php:

        $CFG->passwordpolicy = 1;
        

      8. Log out
      9. View the login page
      10. Click to sign up as a new user
        1. Confirm that the text appears above the Password field
      Show
      Log in as admin Navigate to Site administration -> Plugins -> Authentication -> Manage authentication plugins Ensure that the "Email-based self-registration" plugin is enabled Set the "Self registration" setting to "Email-based self-registration" Create a file auth/manual/lib.php <?php function auth_manual_print_password_policy() { return[ "this is awesome"]; } Purge caches: php admin/cli/purge_caches.php Add the following in config.php: $CFG->passwordpolicy = 1; Log out View the login page Click to sign up as a new user Confirm that the text appears above the Password field
    • Affected Branches:
      MOODLE_38_STABLE
    • Fixed Branches:
      MOODLE_38_STABLE
    • Pull Master Branch:
      MDL-66278-password-help

      Description

      You can add additional checks to the password via the callback check_password_policy

      But these don't get shown on the signup page via print_password_policy()

       

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  18/Nov/19

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour, 20 minutes
                  1h 20m