// DeleteUser - delete individual users.
/*
0 - Deactivate user. This blocks logins but retains data and enterprise membership
1 - Remove user. This removed the user from the enterprise but otherwise keeps the account itself active.
2 - Delete user. This will delete the account entirely.
*/
delete individual users.

Deactivate user. This blocks logins but retains data and enterprise membership
1 - Remove user. This removed the user from the enterprise but otherwise keeps the account itself active.
2 - Delete user. This will delete the account entirely.
// DeleteUser - delete individual users . / * 0 - Deactivate user . This blocks logins but retains data and enterprise membership 1 - Remove user . This removed the user from the enterprise but otherwise keeps the account itself active . 2 - Delete user . This will delete the account entirely . * /
func (s *UserService) DeleteUser(name string, mode DeactivationMode) error {
	s.command = "deluser"
	s.data = struct {
		UserName     string `json:"username"`
		DeleteAction int    `json:"deleteaction"`
	}{UserName: name, DeleteAction: int(mode)}
	res, err := s.doRequest()
	status := &APIResultStatus{}
	err = JSONBodyDecoder(res, status)
	if err != nil {
		return err
	}
	return status.Error()
}
func ( s * UserService ) DeleteUser ( name string , mode DeactivationMode ) error { s . command = " " s . data = struct { UserName string `json:"username"` DeleteAction int `json:"deleteaction"` } { UserName : name , DeleteAction : int ( mode ) } res , err := s . doRequest ( ) status := & APIResultStatus { } err = JSONBodyDecoder ( res , status ) if err != nil { return err } return status . Error ( ) }
delete individual users.
delete individual users .