Demo entry 2286467

deleteUsers

   

Submitted by anonymous on Jul 20, 2015 at 19:39
Language: JavaScript. Code size: 400 Bytes.

function deleteUsers (users) {
    var i;

    for (i = 0; i < users.length; i++) {
        $.delete("users/" + users[i], {
            success: function () {
                if (i === users.length) {
                    console.log("All done!");
                } else {
                    console.log((i / users.length) * 100);
                }
            }
        });
    }    
}

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).