| @@ 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->invokePost('SELECT_USERS', $options); |
|
| 90 | } |
|
| 91 | ||
| 92 | /** |
|
| 93 | * Suspends a single account |
|
| @@ 117-124 (lines=8) @@ | ||
| 114 | * @param string[] $usernames Accounts to delete |
|
| 115 | * @param bool $suspend (true - suspend, false - unsuspend) |
|
| 116 | */ |
|
| 117 | public function suspendAccounts(array $usernames, $suspend = true) |
|
| 118 | { |
|
| 119 | $options = ['suspend' => $suspend ? 'Suspend' : 'Unsuspend']; |
|
| 120 | foreach (array_values($usernames) as $idx => $username) { |
|
| 121 | $options["select{$idx}"] = $username; |
|
| 122 | } |
|
| 123 | $this->invokePost('SELECT_USERS', $options); |
|
| 124 | } |
|
| 125 | ||
| 126 | /** |
|
| 127 | * Unsuspends multiple accounts. |
|