MediaWiki REL1_35
SystemBlock.php
Go to the documentation of this file.
1<?php
23namespace MediaWiki\Block;
24
36
46 public function __construct( array $options = [] ) {
47 parent::__construct( $options );
48
49 $defaults = [
50 'systemBlock' => null,
51 ];
52
53 $options += $defaults;
54
55 $this->systemBlockType = $options['systemBlock'];
56 }
57
68 public function getSystemBlockType() {
70 }
71
75 public function getIdentifier() {
76 return $this->getSystemBlockType();
77 }
78
82 public function appliesToPasswordReset() {
83 switch ( $this->getSystemBlockType() ) {
84 case null:
85 case 'global-block':
86 return $this->isCreateAccountBlocked();
87 case 'proxy':
88 return true;
89 case 'dnsbl':
90 case 'wgSoftBlockRanges':
91 return false;
92 default:
93 return true;
94 }
95 }
96
100 public function getBy() {
101 return 0;
102 }
103
107 public function getByName() {
108 return '';
109 }
110}
isCreateAccountBlocked( $x=null)
Get or set the flag indicating whether this block blocks the target from creating an account.
System blocks are temporary blocks that are created on enforcement (e.g.
getByName()
Get the username of the blocking sysop.string
getSystemBlockType()
Get the system block type, if any.
__construct(array $options=[])
Create a new block with specified parameters on a user, IP or IP range.
getBy()
Get the user id of the blocking sysop.int (0 for foreign users)
appliesToPasswordReset()
Check if the block prevents a user from resetting their password.1.33 bool The block blocks password ...
getIdentifier()
Get the information that identifies this block, such that a user could look up everything that can be...