Reedy has uploaded a new change for review. https://gerrit.wikimedia.org/r/184141
Change subject: Parameter type hints for Bug54847.php ...................................................................... Parameter type hints for Bug54847.php Remove unused variable too Change-Id: I89b652a7d05b44337c115097fbfe55aed0496d7c --- M wmf-config/Bug54847.php 1 file changed, 47 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/41/184141/1 diff --git a/wmf-config/Bug54847.php b/wmf-config/Bug54847.php index 6b056db..c2e0aae 100644 --- a/wmf-config/Bug54847.php +++ b/wmf-config/Bug54847.php @@ -1,5 +1,12 @@ <?php +/** + * @param User $user + * @param null $loggedout + * @param bool $isGlobal + * @return bool + * @throws CentralAuthReadOnlyError + */ function efUserIsAffected ( $user, &$loggedout = null, &$isGlobal = false ) { global $wgMemc; @@ -74,10 +81,14 @@ } -// Abort existing open sessions for affected users. (But not -// repeatedly, only once.) -// Maybe we dont do this and just reset everyone's tokens instead? - +/** + * Abort existing open sessions for affected users. (But not + * repeatedly, only once.) + * Maybe we dont do this and just reset everyone's tokens instead? + * + * @param User $user + * @throws CentralAuthReadOnlyError + */ $wgHooks['UserLoadAfterLoadFromSession'][] = function ( $user ) { if ( efUserIsAffected( $user ) ) { $dbw = CentralAuthUser::getCentralDB(); @@ -93,7 +104,12 @@ } }; - +/** + * @param User $user + * @param $result + * @return bool + * @throws CentralAuthReadOnlyError + */ $wgHooks['UserLoadFromSession'][] = function ( $user, &$result ) { $loggedout = false; @@ -129,6 +145,14 @@ return true; }; +/** + * @param User $user + * @param $password + * @param $retval + * @param $msg + * @return bool + * @throws MWException + */ $wgHooks[ 'AbortLogin' ][] = function ( User $user, $password, &$retval, &$msg ) { global $wgOut, $egBug54847; if ( empty( $egBug54847 ) && $user->checkPassword( $password ) && efUserIsAffected( $user ) ) { @@ -140,11 +164,20 @@ } }; -// Reject attempts to set an existing password as the new password. +/** + * Reject attempts to set an existing password as the new password. + * + * @param User $user + * @param $password + * @param $newpassword + * @param $errorMsg + * @return bool + * @throws CentralAuthReadOnlyError + * @throws MWException + */ $wgHooks['AbortChangePassword'][] = function ( $user, $password, $newpassword, &$errorMsg ) { global $egBug54847; - $passwordOK = false; $loggedout = false; $isGlobal = false; @@ -233,6 +266,13 @@ ); }; +/** + * @param User $user + * @param $pass + * @param $msg + * @return bool + * @throws CentralAuthReadOnlyError + */ $wgHooks['PrefsPasswordAudit'][] = function ( $user, $pass, $msg ) { global $egBug54847, $wgMemc; -- To view, visit https://gerrit.wikimedia.org/r/184141 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I89b652a7d05b44337c115097fbfe55aed0496d7c Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Reedy <re...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits