The man has been sentenced for two years in prison