// Unlock the ticked users $output = array(); for ($i = 0; $i <= $_POST['unlockMax']; $i++) { $user = $_POST['unlocktick_' . $i]; if ($user) { // Unlock the user $theDropbox->database->DBDeleteLoginlog($user); $output[] = $user; } } if ($output) { NSSError("Unlocked " . implode(', ', $output) . "."); } } // Build the list of locked users $all = $theDropbox->database->DBLoginlogAll(time() - $theDropbox->loginFailTime()); $failures = array(); $lockedout = array(); $names = array(); $unlockMax = 0; $max = $theDropbox->loginFailMax(); foreach ($all as $rec) { $failures[$rec['username']]++; } foreach ($failures as $user => $count) { if ($count >= $max) { $lockedout[] = $user; $props = array(); $theDropbox->authenticator()->validUsername($user, $props); if ($props['displayName']) { $names[] = $props['displayName'];