Skip to content

Commit 85fd458

Browse files
authored
feat(users): add wipe method to UsersAPI (#368)
1 parent b383d23 commit 85fd458

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

nc_py_api/users.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,10 @@ def disable(self, user_id: str) -> None:
207207
"""Disables user on the Nextcloud server."""
208208
self._session.ocs("PUT", f"{self._ep_base}/{user_id}/disable")
209209

210+
def wipe(self, user_id: str) -> None:
211+
"""Disconnects user from the Nextcloud server and deletes all local data stored on the user's devices."""
212+
self._session.ocs("POST", f"/ocs/v2.php/cloud/users/{user_id}/wipe")
213+
210214
def resend_welcome_email(self, user_id: str) -> None:
211215
"""Send welcome email for specified user again."""
212216
self._session.ocs("POST", f"{self._ep_base}/{user_id}/welcome")

0 commit comments

Comments
 (0)