From 6ca0d3f32d0fb0fb9ce7e01e006509dc3b950769 Mon Sep 17 00:00:00 2001 From: Daniel Kinzler Date: Wed, 7 Mar 2007 11:24:13 +0000 Subject: [PATCH] added hook to isValidPassword (patch by Ger Apeldoorn, Bug 9180) --- includes/User.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/includes/User.php b/includes/User.php index 56f249a74a..2da396840c 100644 --- a/includes/User.php +++ b/includes/User.php @@ -464,7 +464,16 @@ class User { */ static function isValidPassword( $password ) { global $wgMinimalPasswordLength; - return strlen( $password ) >= $wgMinimalPasswordLength; + + $result = null; + if( !wfRunHooks( 'isValidPassword', array( $password, &$result ) ) ) return $result; + if ($result === false) return false; + if (strlen( $password ) >= $wgMinimalPasswordLength) { + return true; + } + else { + return false; + } } /** -- 2.20.1