mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
MDL-67950 core: check_password_policy only fires when passwordpolicy = 1
This commit is contained in:
parent
2c0b08c5a7
commit
648e20ab6d
@ -5006,16 +5006,16 @@ function check_password_policy($password, &$errmsg, $user = null) {
|
||||
if (!check_consecutive_identical_characters($password, $CFG->maxconsecutiveidentchars)) {
|
||||
$errmsg .= '<div>'. get_string('errormaxconsecutiveidentchars', 'auth', $CFG->maxconsecutiveidentchars) .'</div>';
|
||||
}
|
||||
}
|
||||
|
||||
// Fire any additional password policy functions from plugins.
|
||||
// Plugin functions should output an error message string or empty string for success.
|
||||
$pluginsfunction = get_plugins_with_function('check_password_policy');
|
||||
foreach ($pluginsfunction as $plugintype => $plugins) {
|
||||
foreach ($plugins as $pluginfunction) {
|
||||
$pluginerr = $pluginfunction($password, $user);
|
||||
if ($pluginerr) {
|
||||
$errmsg .= '<div>'. $pluginerr .'</div>';
|
||||
// Fire any additional password policy functions from plugins.
|
||||
// Plugin functions should output an error message string or empty string for success.
|
||||
$pluginsfunction = get_plugins_with_function('check_password_policy');
|
||||
foreach ($pluginsfunction as $plugintype => $plugins) {
|
||||
foreach ($plugins as $pluginfunction) {
|
||||
$pluginerr = $pluginfunction($password, $user);
|
||||
if ($pluginerr) {
|
||||
$errmsg .= '<div>'. $pluginerr .'</div>';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -32,6 +32,7 @@ information provided here is intended especially for developers.
|
||||
* The database drivers (moodle_database and subclasses) don't need to implement get_columns() anymore.
|
||||
They have to implement fetch_columns instead.
|
||||
* Added function cleanup_after_drop to the database_manager class to take care of all the cleanups that need to be done after a table is dropped.
|
||||
* The 'xxxx_check_password_policy' callback now only fires if $CFG->passwordpolicy is true
|
||||
|
||||
=== 3.8 ===
|
||||
* Add CLI option to notify all cron tasks to stop: admin/cli/cron.php --stop
|
||||
|
Loading…
x
Reference in New Issue
Block a user