// 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']; } else { $names[] = "Unknown user"; } $unlockMax++; }