dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Rewrite pref cleanup script"
[lhc/web/wiklou.git]
/
includes
/
auth
/
CheckBlocksSecondaryAuthenticationProvider.php
diff --git
a/includes/auth/CheckBlocksSecondaryAuthenticationProvider.php
b/includes/auth/CheckBlocksSecondaryAuthenticationProvider.php
index
f7a7ec1
..
7488fba
100644
(file)
--- a/
includes/auth/CheckBlocksSecondaryAuthenticationProvider.php
+++ b/
includes/auth/CheckBlocksSecondaryAuthenticationProvider.php
@@
-77,9
+77,19
@@
class CheckBlocksSecondaryAuthenticationProvider extends AbstractSecondaryAuthen
public function testUserForCreation( $user, $autocreate, array $options = [] ) {
$block = $user->isBlockedFromCreateAccount();
if ( $block ) {
public function testUserForCreation( $user, $autocreate, array $options = [] ) {
$block = $user->isBlockedFromCreateAccount();
if ( $block ) {
+ if ( $block->mReason ) {
+ $reason = $block->mReason;
+ } else {
+ $msg = \Message::newFromKey( 'blockednoreason' );
+ if ( !\RequestContext::getMain()->getUser()->isSafeToLoad() ) {
+ $msg->inContentLanguage();
+ }
+ $reason = $msg->text();
+ }
+
$errorParams = [
$block->getTarget(),
$errorParams = [
$block->getTarget(),
- $
block->mReason ?: \Message::newFromKey( 'blockednoreason' )->text()
,
+ $
reason
,
$block->getByName()
];
$block->getByName()
];