Auth\Controller\Accounts::remove PHP Method

remove() public method

public remove ( )
    public function remove()
    {
        if ($data = $this->param("account", false)) {
            // user can't delete himself
            if ($data["_id"] != $this->user["_id"]) {
                $this->app->db->remove("cockpit/accounts", ["_id" => $data["_id"]]);
                return '{"success":true}';
            }
        }
        return false;
    }