modified process_user method