MediaWiki REL1_37
UserGroupExpiryJob.php
Go to the documentation of this file.
1<?php
2
4
27class UserGroupExpiryJob extends Job implements GenericParameterJob {
28 public function __construct( array $params ) {
29 parent::__construct( 'userGroupExpiry', $params );
30 $this->removeDuplicates = true;
31 }
32
37 public function run() {
38 MediaWikiServices::getInstance()->getUserGroupManager()->purgeExpired();
39 return true;
40 }
41}
Class to both describe a background job and handle jobs.
Definition Job.php:37
MediaWikiServices is the service locator for the application scope of MediaWiki.
__construct(array $params)
Interface for generic jobs only uses the parameters field and are JSON serializable.