|
@@ 83-90 (lines=8) @@
|
| 80 |
|
* |
| 81 |
|
* @param string[] $usernames Accounts to delete |
| 82 |
|
*/ |
| 83 |
|
public function deleteAccounts(array $usernames) |
| 84 |
|
{ |
| 85 |
|
$options = ['confirmed' => 'Confirm', 'delete' => 'yes']; |
| 86 |
|
foreach (array_values($usernames) as $idx => $username) { |
| 87 |
|
$options["select{$idx}"] = $username; |
| 88 |
|
} |
| 89 |
|
$this->invokeApiPost('SELECT_USERS', $options); |
| 90 |
|
} |
| 91 |
|
|
| 92 |
|
/** |
| 93 |
|
* Suspends a single account. |
|
@@ 118-125 (lines=8) @@
|
| 115 |
|
* @param string[] $usernames Accounts to delete |
| 116 |
|
* @param bool $suspend (true - suspend, false - unsuspend) |
| 117 |
|
*/ |
| 118 |
|
public function suspendAccounts(array $usernames, $suspend = true) |
| 119 |
|
{ |
| 120 |
|
$options = ['suspend' => $suspend ? 'Suspend' : 'Unsuspend']; |
| 121 |
|
foreach (array_values($usernames) as $idx => $username) { |
| 122 |
|
$options['select' . $idx] = $username; |
| 123 |
|
} |
| 124 |
|
$this->invokeApiPost('SELECT_USERS', $options); |
| 125 |
|
} |
| 126 |
|
|
| 127 |
|
/** |
| 128 |
|
* Unsuspends multiple accounts. |