I am working on a moderation tool. One of the actions I want my moderators to be able to achieve is setting a user account as spam. I know how to do so via the UI as admin but how do I do the same via code?

closed as off-topic by Jacob Peattie, fuxia Aug 15 at 23:04

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.