func (lgc *Logic) DeleteUser(name string) (int, error) {
	// Check deleted user exists
	ok, err := lgc.HasUser(name)
	if err != nil {
		return 500, err
	}
	if !ok {
		return 404, fmt.Errorf(`the user "%s" is not found`, name)
	}
	if name == "admin" {
		// graylog spec
		return 404, fmt.Errorf(`the user "%s" is not found`, name)
	}
	// Delete a user
	if err := lgc.store.DeleteUser(name); err != nil {
		return 500, err
	}
	return 204, nil
}
// DeleteUser removes a user from the Server.
DeleteUser removes a user from the Server.
// DeleteUser removes a user from the Server .
func (lgc *Logic) DeleteUser(name string) (int, error) {
	ok, err := lgc.HasUser(name)
	if err != nil {
		return 500, err
	}
	if !ok {
		return 404, fmt.Errorf(`the user "%s" is not found`, name)
	}
	if name == "admin" {
		return 404, fmt.Errorf(`the user "%s" is not found`, name)
	}
	if err := lgc.store.DeleteUser(name); err != nil {
		return 500, err
	}
	return 204, nil
}
func ( lgc * Logic ) DeleteUser ( name string ) ( int , error ) { ok , err := lgc . HasUser ( name ) if err != nil { return 500 , err } if ! ok { return 404 , fmt . Errorf ( `the user "%s" is not found` , name ) } if name == " " { return 404 , fmt . Errorf ( `the user "%s" is not found` , name ) } if err := lgc . store . DeleteUser ( name ) ; err != nil { return 500 , err } return 204 , nil }
DeleteUser removes a user from the Server.
DeleteUser removes a user from the Server .
// Check deleted user exists // graylog spec // Delete a user