Allow AbortLogin hook to override error messages
authorBrad Jorsch <bjorsch@wikimedia.org>
Wed, 2 Oct 2013 17:46:30 +0000 (13:46 -0400)
committerOri.livneh <ori@wikimedia.org>
Wed, 2 Oct 2013 20:01:42 +0000 (20:01 +0000)
commitc1123f72723cbec3183a0035be4ee2bfb2b903af
treeadee44ed95e5a700e31266e13769c64c50a6ce56
parent0aa4ff814eb885ebe23697aabc2311afaeb5a5f8
Allow AbortLogin hook to override error messages

The AbortLogin hook has a $msg argument that allows for specifying a
MediaWiki message to display to the user. But this message is only used
when the hook is aborted with LoginForm::ABORTED. There's no reason not
to use this same parameter for the other possible failure constants.

Note this is a slight change in behavior for the hook, as previously the
$msg parameter would be coming in as "login-abort-generic" unless an
earlier hook altered it, while now it will be null.

Change-Id: Ib03a1aed9dfb566a027c31c015aa30619174a6c2
includes/specials/SpecialUserlogin.php