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

Add a callback to add content to print_password_policy

XMLWordPrintable

    • MOODLE_38_STABLE
    • MOODLE_38_STABLE
    • MDL-66278-password-help
    • 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

      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()

       

            brendanheywood Brendan Heywood
            brendanheywood Brendan Heywood
            Matt Porritt Matt Porritt
            Andrew Lyons Andrew Lyons
            Anna Carissa Sadia Anna Carissa Sadia
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

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

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.