MediaWiki master
UserGroupExpiryJob.php
Go to the documentation of this file.
1<?php
22
29class 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}
array $params
The job parameters.
Describe and execute a background job.
Definition Job.php:41
Service locator for MediaWiki core services.
Job that purges expired user group memberships.
__construct(array $params)
Interface for generic jobs only uses the parameters field and are JSON serializable.