public function index()
{
$current = $this->user["_id"];
$accounts = $this->app->db->find("cockpit/accounts", ["filter" => $this->user["group"] == "admin" ? null : ["_id" => $current], "sort" => ["user" => 1]])->toArray();
foreach ($accounts as &$account) {
$account["md5email"] = md5(@$account["email"]);
}
return $this->render('auth:views/accounts/index.php', compact('accounts', 'current'));
}