MediaWiki REL1_40
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}
Class to both describe a background job and handle jobs.
Definition Job.php:39
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.