File "itsec-release-lockout.php"

Full Path: /home/siazco/grocery.siazco.se/wp-content/plugins/better-wp-security/core/sync-verbs/itsec-release-lockout.php
File size: 644 bytes
MIME-type: text/x-php
Charset: utf-8

<?php

class Ithemes_Sync_Verb_ITSEC_Release_Lockout extends Ithemes_Sync_Verb {

	public static $name = 'itsec-release-lockout';
	public static $description = 'Release a lockout set by Solid Security.';

	public $default_arguments = array(
		'id' => '', //lockout id to release
	);

	public function run( $arguments ) {

		/** @var ITSEC_Lockout $itsec_lockout */
		global $itsec_lockout;

		$id     = intval( $arguments['id'] );
		$result = $itsec_lockout->release_lockout( $id );

		if ( $result === false ) {

			$status = 'error';

		} else {

			$status = 'ok';

		}

		return array(
			'api'    => '0',
			'status' => $status
		);

	}

}