~ubuntu-branches/ubuntu/jaunty/moodle/jaunty

« back to all changes in this revision

Viewing changes to login/change_password_form.php

  • Committer: Bazaar Package Importer
  • Author(s): Jordan Mantha, Matt Oquist
  • Date: 2009-02-25 15:16:22 UTC
  • mfrom: (1.1.11 upstream)
  • Revision ID: james.westby@ubuntu.com-20090225151622-0ekt1liwhv2obfza
Tags: 1.9.4.dfsg-0ubuntu1
* Merge with Debian git (Closes LP: #322961, #239481, #334611):
  - use Ubuntu's smarty lib directory for linking
  - use internal yui library 
  - add update-notifier support back in

[Matt Oquist]
  * renamed prerm script
  * significantly rewrote postinst and other maintainer scripts to improve
    user experience and package maintainability
    (Closes LP: #225662, #325450, #327843, #303078, #234609)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?php //$Id: change_password_form.php,v 1.6.2.3 2007/04/02 18:02:20 skodak Exp $
 
1
<?php //$Id: change_password_form.php,v 1.11.2.1 2007/11/23 22:12:35 skodak Exp $
2
2
 
3
3
require_once $CFG->libdir.'/formslib.php';
4
4
 
40
40
    }
41
41
 
42
42
/// perform extra password change validation
43
 
    function validation($data){
 
43
    function validation($data, $files) {
44
44
        global $USER;
45
 
        $errors = array();
 
45
        $errors = parent::validation($data, $files);
46
46
 
47
47
        update_login_count();
48
48
 
66
66
            return $errors;
67
67
        }
68
68
 
69
 
        return true;
 
69
        $errmsg = '';//prevents eclipse warnings
 
70
        if (!check_password_policy($data['newpassword1'], $errmsg)) {
 
71
            $errors['newpassword1'] = $errmsg;
 
72
            $errors['newpassword2'] = $errmsg;
 
73
            return $errors;
 
74
        }
 
75
 
 
76
        return $errors;
70
77
    }
71
78
}
72
79
?>