Pass the user as an argument to 'isValidPassword' hook callbacks; see docs/hooks.txt for more information

This commit is contained in:
Rob Church 2007-07-17 22:30:52 +00:00
parent b76908589a
commit 396524f674
3 changed files with 4 additions and 1 deletions

View file

@ -150,6 +150,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
phisticated handheld browser.
* (bug 3173) Option to offer exported pages as a download, rather than displaying
inline, as in most browsers
* Pass the user as an argument to 'isValidPassword' hook callbacks; see
docs/hooks.txt for more information
== Bugfixes since 1.10 ==

View file

@ -467,6 +467,7 @@ after noinclude/includeonly/onlyinclude and other processing.
'isValidPassword': Override the result of User::isValidPassword()
$password: Desired password
&$result: Set this and return false to override the internal checks
$user: User the password is being validated for
'LoginAuthenticateAudit': a login attempt for a valid user account either succeeded or failed.
No return data is accepted; this hook is for auditing only.

View file

@ -490,7 +490,7 @@ class User {
global $wgMinimalPasswordLength, $wgContLang;
$result = null;
if( !wfRunHooks( 'isValidPassword', array( $password, &$result ) ) )
if( !wfRunHooks( 'isValidPassword', array( $password, &$result, $this ) ) )
return $result;
if( $result === false )
return false;