MediaWiki  1.34.0
purgeExpiredUserrights.php
Go to the documentation of this file.
1 <?php
23 require_once __DIR__ . '/Maintenance.php';
24 
25 /*
26  * Maintenance script to move expired userrights to user_former_groups
27  *
28  * @since 1.31
29  */
30 
32  public function __construct() {
33  parent::__construct();
34  $this->addDescription( 'Move expired userrights from user_groups to former_user_groups table.' );
35  }
36 
37  public function execute() {
38  $this->output( "Purging expired user rights...\n" );
40  if ( $res === false ) {
41  $this->output( "Purging failed.\n" );
42  } else {
43  $this->output( "$res rows purged.\n" );
44  }
45  }
46 }
47 
48 $maintClass = PurgeExpiredUserrights::class;
49 require_once RUN_MAINTENANCE_IF_MAIN;
RUN_MAINTENANCE_IF_MAIN
const RUN_MAINTENANCE_IF_MAIN
Definition: Maintenance.php:39
$maintClass
$maintClass
Definition: purgeExpiredUserrights.php:48
Maintenance\addDescription
addDescription( $text)
Set the description text.
Definition: Maintenance.php:348
Maintenance
Abstract maintenance class for quickly writing and churning out maintenance scripts with minimal effo...
Definition: Maintenance.php:82
UserGroupMembership\purgeExpired
static purgeExpired()
Purge expired memberships from the user_groups table.
Definition: UserGroupMembership.php:245
$res
$res
Definition: testCompression.php:52
PurgeExpiredUserrights
Remove expired userrights from user_groups table and move them to former_user_groups.
Definition: purgeExpiredUserrights.php:31
PurgeExpiredUserrights\execute
execute()
Do the actual work.
Definition: purgeExpiredUserrights.php:37
PurgeExpiredUserrights\__construct
__construct()
Default constructor.
Definition: purgeExpiredUserrights.php:32
Maintenance\output
output( $out, $channel=null)
Throw some output to the user.
Definition: Maintenance.php:453