如何通过php禁用/停用/删除话语用户帐户? [关闭]

I use for my discourse site my own registration and SSO via discourse-api-php and LDAP. Is there some option how to disable, deactive or delete user via php? Because when I delete/deactive user account in LDAP, user profil at discourse portal is still active and I wanna have every user-management on one page.

According to this post the route to suspend a user is

/admin/users/:user_id/suspend

The controller for this is here - it accepts the parameters duration and reason.

This function isn't in the library you are using, so you'll need to add it yourself to use it.