MediaWiki
REL1_40
UserGroupExpiryJob.php
Go to the documentation of this file.
1
<?php
21
use
MediaWiki\MediaWikiServices
;
22
29
class
UserGroupExpiryJob
extends
Job
implements
GenericParameterJob
{
30
public
function
__construct
( array $params ) {
31
parent::__construct(
'userGroupExpiry'
, $params );
32
$this->removeDuplicates =
true
;
33
}
34
39
public
function
run
() {
40
MediaWikiServices::getInstance()->getUserGroupManager()->purgeExpired();
41
return
true
;
42
}
43
}
Job
Class to both describe a background job and handle jobs.
Definition
Job.php:39
MediaWiki\MediaWikiServices
Service locator for MediaWiki core services.
Definition
MediaWikiServices.php:223
UserGroupExpiryJob
Job that purges expired user group memberships.
Definition
UserGroupExpiryJob.php:29
UserGroupExpiryJob\__construct
__construct(array $params)
Definition
UserGroupExpiryJob.php:30
UserGroupExpiryJob\run
run()
Run the job.
Definition
UserGroupExpiryJob.php:39
GenericParameterJob
Interface for generic jobs only uses the parameters field and are JSON serializable.
Definition
GenericParameterJob.php:31
includes
jobqueue
jobs
UserGroupExpiryJob.php
Generated on Thu Jun 27 2024 14:03:01 for MediaWiki by
1.10.0