Index: moodle/lib/weblib.php
--- moodle/lib/weblib.php Base (1.970.2.151)
+++ moodle/lib/weblib.php Locally Modified (Based On 1.970.2.151)
@@ -7113,5 +7117,34 @@
     return $authtitle;
 }

+ /**
+ * Print password policy.
+ * @uses $CFG
+ * @return string
+ */
+ function print_password_policy(){
+     global $CFG;
+     $messages = array();
+
+     if(!empty($CFG->passwordpolicy)){
+            $messages[] = get_string('errorminpasswordlength', 'auth', $CFG->minpasswordlength);
+            if(!empty($CFG->minpassworddigits)){
+                $messages[] = get_string('errorminpassworddigits', 'auth', $CFG->minpassworddigits);
+            }
+            if(!empty($CFG->minpasswordlower)){
+                $messages[] = get_string('errorminpasswordlower', 'auth', $CFG->minpasswordlower);
+            }
+            if(!empty($CFG->minpasswordupper)){
+                $messages[] = get_string('errorminpasswordupper', 'auth', $CFG->minpasswordupper);
+            }
+            if(!empty($CFG->minpasswordnonalphanum)){
+                $messages[] = get_string('errorminpasswordnonalphanum', 'auth', $CFG->minpasswordnonalphanum);
+            }
+            $message = join('<br />', $messages);
+            $message = '<div class="fitemtitle">&nbsp;</div><div class="felement ftext">'. $message . '</div>';
+        }
+        return $message;
+ }
+
 // vim:autoindent:expandtab:shiftwidth=4:tabstop=4:tw=140:
 ?>

Index: moodle/login/change_password_form.php
--- moodle/login/change_password_form.php Base (1.11.2.2)
+++ moodle/login/change_password_form.php Locally Modified (Based On 1.11.2.2)
@@ -5,7 +5,7 @@
 class login_change_password_form extends moodleform {
 
     function definition() {
-        global $USER;
+        global $USER, $CFG;
 
         $mform =& $this->_form;
 
@@ -14,6 +14,10 @@
         // visible elements
         $mform->addElement('static', 'username', get_string('username'), $USER->username);
 
+        if(!empty($CFG->passwordpolicy)){
+            $passwordpolicy = print_password_policy();
+            $mform->addElement('html', $passwordpolicy);
+        }
         $mform->addElement('password', 'password', get_string('oldpassword'));
         $mform->addRule('password', get_string('required'), 'required', null, 'client');
         $mform->setType('password', PARAM_RAW);

Index: moodle/login/signup_form.php
--- moodle/login/signup_form.php Base (1.35.2.8)
+++ moodle/login/signup_form.php Locally Modified (Based On 1.35.2.8)
@@ -16,6 +16,10 @@
         $mform->setType('username', PARAM_NOTAGS);
         $mform->addRule('username', get_string('missingusername'), 'required', null, 'server');
 
+        if(!empty($CFG->passwordpolicy)){
+            $passwordpolicy = print_password_policy();
+            $mform->addElement('html', $passwordpolicy);
+        }
         $mform->addElement('passwordunmask', 'password', get_string('password'), 'maxlength="32" size="12"');
         $mform->setType('password', PARAM_RAW);
         $mform->addRule('password', get_string('missingpassword'), 'required', null, 'server');

Index: moodle/user/editadvanced_form.php
--- moodle/user/editadvanced_form.php Base (1.14.2.16)
+++ moodle/user/editadvanced_form.php Locally Modified (Based On 1.14.2.16)
@@ -36,6 +36,10 @@
         $mform->setHelpButton('auth', array('authchange', get_string('chooseauthmethod','auth')));
         $mform->setAdvanced('auth');
 
+        if(!empty($CFG->passwordpolicy)){
+            $passwordpolicy = print_password_policy();
+            $mform->addElement('html', '<div class="fitem">'.$passwordpolicy . '</div>');
+        }
         $mform->addElement('passwordunmask', 'newpassword', get_string('newpassword'), 'size="20"');
         $mform->setHelpButton('newpassword',array('newpassword', get_string('leavetokeep')));
         $mform->setType('newpassword', PARAM_RAW);
